Interactive UI controls for your CSS --custom-properties,
automatically. From your pals at
.
Click the
Just define CSS variables in your stylesheet. SlideVars figures out the rest:
/* Your CSS */
:root {
--size: ;
--bg: ;
--border-radius: ;
--rotation: ;
--shadow-size: ;
}
For more control, configure each variable manually with custom ranges:
You can manually place the
<slide-vars>
element wherever you want HTML (rather than it being auto-injected
into the bottom of the <body>). Children will be
slotted into the top of the control panel.
Auto-detected sliders support all CSS numeric data types with intelligent default ranges:
px, cm,
mm, in, pt, pc,
Q
em, rem,
ex, ch, cap, lh,
and root variants (rex, rch, etc.)
vw, vh,
vmin, vmax, and variants
(svw, lvh, dvw, etc.)
cqw, cqh,
cqi, cqb, cqmin,
cqmax
deg, grad,
rad, turn
s, msHz, kHzdpi, dpcm,
dppx
%fr💡 Smart Adaptation: Ranges automatically expand if the current value is outside the defaults.
Auto-detected color variables support:
#rgb, #rrggbb,
#rrggbbaa
rgb(),
rgba(), hsl(), hsla()
transparent and currentColor)
Note: newer color syntaxes (like oklch() /
color()) aren’t currently auto-detected.
slideVars.init(config?, options?)Initialize the component with optional configuration.
defaultOpen: boolean - Whether controls are open on
load (default: false)
auto: boolean - Enable auto-detection (default: true if
config is empty)
scope: string - CSS selector to read variables from
(default: ":root")