v1.13.5
Vitra CSS
Cinematic glassmorphism with a living landscape behind it.
Zero dependencies, pure CSS.
Beautiful by default. Instant to ship.
Glassmorphism, cinematic animations, and a full design system — all in a single 20 kB stylesheet. No build step, no config, no npm install. Drop one line into any HTML page and start building.
- 20 kB brotli
- Zero dependencies
- No build step
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/DesvoSoft/Vitra@v1.13.5/dist/vitra.min.css">
<script src="https://cdn.jsdelivr.net/gh/DesvoSoft/Vitra@v1.13.5/dist/vitra.min.js"></script>
<div class="vitra-card vitra-glass">Hello, Vitra!</div>
<!DOCTYPE html>
<html data-theme="auto">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/DesvoSoft/Vitra@v1.13.5/dist/vitra.min.css">
</head>
<body>
<div class="vitra-card vitra-glass">Hello, Vitra!</div>
<script src="https://cdn.jsdelivr.net/gh/DesvoSoft/Vitra@v1.13.5/dist/vitra.min.js"></script>
</body>
</html>
That's it — no build step, no configuration. GitHub →
1.13 Motion that costs nothing
Everything that moves in the background now runs on the compositor: no repaints, no per-frame style work, paused the moment it leaves the screen. What that buys is headroom to make the things you touch feel alive.
Things arrive with a spring
Three easing tokens, same distance, same duration. Modals, toasts, drawers and menus spring in and ease out.
--vitra-ease-luxury--vitra-ease-spring-soft--vitra-ease-springThemes that bloom
Pick one. The new theme grows out of the button you pressed, over a frozen snapshot of the old one — one View Transition, nothing in the page repaints per frame.
button.onclick = (event) =>
Vitra.theme.set('neon', { transition: true, origin: event });
Light on the machine
The hero above — stars twinkling, ranges drifting, moon breathing — measured on an idle page. Every moving layer animates on the compositor: nothing is repainted and the main thread stays idle, while the ranges glide at sub-pixel precision.
- Repaints / second
- Main thread busy
v1.12 v1.13.3 · headless Chromium, 1600×900, dark theme
Cinematic Effects
Five premium visual effects added in v1.4.0 — inspired by Stripe, Linear, and Raycast aesthetics.
NEW Animated Mesh Gradient
Radial mesh gradient with 3 blobs that shift position continuously via vitra-mesh-shift keyframes.
NEW Floating Glow Orbs
Large blur spheres (300–400px) with 80px blur that float in parallax via vitra-float keyframes.
NEW Animated Gradient Text
Text with animated gradient via background-clip: text and vitra-text-shift keyframes.
Edit this text — it uses gradient!
NEW Spinning Border Glow
Animated conic-gradient border via oversized ::before with spinning keyframe. Inner area masked via ::after.
Scenery
A CSS-only mountain landscape. Faceted ranges with light-facing planes over a still, dark foreground, a star field that shimmers against a steady far plane, a moon whose corona breathes. It fades up when it enters the screen, separates into depth planes as it scrolls away, and re-colours itself from the theme's accent.
div. The mountains, clouds, and stars all drift behind this glass at different speeds — same direction, so it reads as one consistent wind. Switch themes — the whole scene re-colors itself.
Markup
One element. With vitra.js on the page the eight layers are written for you; use .vitra-scenery for a full-page backdrop or .vitra-scenery-inline inside any position: relative container. No JavaScript? The docs have the eight-layer markup — the scene itself is pure CSS.
<div class="vitra-scenery"></div>
Direct it with tokens:
.hero {
--vitra-scenery-intro: 1.5; /* entrance fade length, 0 = none */
--vitra-scenery-depth: 1; /* scroll parallax strength */
--vitra-scenery-speed: 1; /* drift speed */
--vitra-scenery-halo-x: 76%; /* moon position */
}
Theme Studio
All 7 themes with tinted neutrals — every surface carries a trace of the accent hue.
Surface Card
This card uses --vitra-color-surface — notice the subtle tint.
backdrop-filter
Modern CSS Features
Vitra leverages 2026 CSS APIs with progressive enhancement fallbacks.
Popover Native Popover API
Uses showPopover() when supported, falls back to class-based toggle.
Entry @starting-style
Elements animate in from their initial state using @starting-style.
Color oklch() Colors
Perceptually uniform color interpolation via --vitra-color-accent-oklch.
CSS Shaders
Pure-CSS shader-like effects — no WebGL, no Three.js, no JS canvas. Progressive enhancement with modern CSS APIs.
NEW Noise Overlay
Grain texture via SVG feTurbulence filter rendered as a data URI background. mix-blend-mode: overlay for cinematic film grain.
NEW Progress Ring
Circular progress indicator using conic-gradient with smooth animation via @property --vitra-progress-ring-value. Set CSS variable as percentage.
NEW Shape Morph
clip-path polygon morphing animation: diamond → square → triangle → hexagon → diamond. 12s ease-in-out loop.
NEW Gradient Rotate
Animated conic-gradient border using @property --vitra-border-glow-angle for smooth angle interpolation. Use .vitra-gradient-rotate-fast or .vitra-gradient-rotate-slow variants.
4s per rotation
2s per rotation
8s per rotation
NEW Scroll-Driven Reveal
Uses animation-timeline: view() for scroll-driven entry animations. Elements fade + slide as they enter the viewport. Progressive enhancement — falls back gracefully in unsupported browsers.
Fade Up
From Left
From Right
Scale In
NEW light-dark() Utility
Native CSS light-dark() function for single-declaration theme switching. These boxes adapt automatically without @media (prefers-color-scheme).
Auto-switches with OS preference
15% accent + bg
10% accent + surface
Design Tokens
All --vitra-* custom properties update instantly when switching themes.
Color Tokens
Spacing Scale
Border Radius
Shadows
Glassmorphism
Frosted glass with backdrop-filter and automatic fallbacks.
Standard Glass
Default glass effect.
Strong Glass
Enhanced blur.
Subtle Glass
Gentle overlay effect.
Colored Border
Glass with accent border.
Glass Cards with Hover
Configurable Particles
Floating particles with glow effects. Configurable via JS API or data attributes.
Particle Controls
Particles will appear here when spawned
Data-Attribute Particles
Particles can also be configured via HTML data-vitra-particles attributes:
<div data-vitra-particles="5" data-vitra-particle-color="#ff6b6b">
<!-- 5 red particles appear here -->
</div>
<!-- v1.9: opt-in falling direction -->
<div data-vitra-particles="8" data-vitra-particle-direction="down">
<!-- 8 particles fade in and drift downward, then fade out -->
</div>
Motion & Animations
Reveal animations, hover interactions, and full prefers-reduced-motion support.
Reveal on Scroll
Uses vitra-reveal — appears when scrolled into view.
Staggered Reveal
Cascading entry via stagger delay.
Smooth Transitions
Respects prefers-reduced-motion.
Hover Interactions
Hover Lift
Lifts with shadow
Hover Glow
Glows on hover
Hover Scale
Scales on hover
Accessibility: prefers-reduced-motion
Vitra automatically disables animations when users prefer reduced motion.
Test: Enable "Reduce motion" in your OS settings, then refresh. All animations will be disabled.
Component Showcase
All Vitra components with token-only styling, glass variants, and built-in accessibility.
Buttons
Cards
Standard Card
Surface + border.
Glass Card
Glassmorphism card.
Hover Card
Lifts on hover.
Form Elements
Tabs
Panel 1
Content for the first tab.
Modals
Focus trapping, ESC close, overlay click close.
Tooltips
Toasts
Programmatic notifications with auto-dismiss and type variants.
Progress Bars
Badges
Avatars
Typography Scale
--vitra-font-size-xs: The quick brown fox
--vitra-font-size-sm: The quick brown fox
--vitra-font-size-base: The quick brown fox
--vitra-font-size-lg: The quick brown fox
--vitra-font-size-xl: The quick brown fox
--vitra-font-size-2xl: The quick brown fox