Live-edit CSS on your React componentswithout leaving the browser.
Wrap any element in <Tunable>, open a floating glass panel in dev mode, drag sliders and pick colors — then copy the final CSS or Tailwind into your code.
A dev-only tool for tuning component styles directly in your browser. Wrap a component in <Tunable>, define which CSS properties you want to tweak, and get a floating control panel that edits the element live. When it looks right, copy the final CSS or Tailwind classes and paste them into your code.
- Not a visual page builder
- Not a design system
- Not shipped to your end users (gated to NODE_ENV === "development" by default)
One package. Dev dependency only.
Peer deps are React 17+ and React DOM 17+. No runtime configuration, no build-step plugins. Install, import, wrap.
npm i -D maptiveui-tunableWrap it. Tune it. Ship it.
In dev mode you'll see a ◆ HERO badge appear when you hover the section. Click it to open the tune panel.
import { Tunable } from "maptiveui-tunable";
<Tunable
label="Hero"
controls={{
padding: { type: "range", min: 0, max: 80, default: 24 },
borderRadius: { type: "range", min: 0, max: 32, default: 12 },
background: { type: "color", default: "#818cf8" },
}}
>
<section>My hero section</section>
</Tunable>Try it yourself — right here.
This is a real <Tunable> instance with enabled forced on. Your tweaks persist between reloads via persistKey.
Keyboard-first, mouse-friendly.
Every control is reachable from the keyboard while a panel is open. Drag the header to reposition; drag the bottom-right corner to resize.
Click the floating ◆ badge on hover, or hold Alt/Option and click the element.
Drag sliders, pick colors from the HSV picker (alpha, eyedropper, presets), toggle switches, choose from dropdowns.
- EscClose the panel
- ⌘ZUndo (or Ctrl + Z)
- ⌘⇧ZRedo (or Ctrl + Shift + Z)
- AltClickDevTools-style inspect & open panel
Copy CSS → clipboard as a ready-to-paste CSS block. Copy TW → Tailwind utility classes (falls back to arbitrary-property syntax when needed).
Pick up where you left off.
Pass a persistKey and values are saved to localStorage under __tunable_v1:<key>.
<Tunable label="Hero" persistKey="hero-section" controls={{ ... }}>Four building blocks.
Every control writes to a CSS property. Omit maps and the object key is used directly.
Numeric slider mapped to a CSS property.
{
type: "range",
min: 0,
max: 100,
step: 1,
default: 20,
unit: "px",
maps: "padding",
}Specifies which CSS property a control writes to. If omitted, the object key is used directly. So { padding: { type: "range", ... } } writes to padding; { heroPad: { type: "range", maps: "padding" } } writes to padding but shows "Hero Pad" in the UI.
When a range's maps is one of these keys, its value composes into richer CSS:
| maps value | Effect |
|---|---|
| depth / boxShadow | Composes a realistic drop shadow with spread, blur, offset |
| blur / backdropBlur | Maps to backdrop-filter: blur(...) |
| glow | Composes a colored outer glow |
<Tunable> props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Element(s) to wrap |
| controls | TunableControls | — | Control definitions (required) |
| label | string | undefined | Name shown in the panel header and hover badge |
| enabled | boolean | NODE_ENV === "development" | Whether the tool is active |
| panelPosition | "right" | "left" | "bottom" | "right" | Where the panel appears relative to the element |
| collapsed | boolean | false | Start with panel collapsed |
| as | ElementType | "div" | Wrapper element tag (span, tr, etc.) |
| persistKey | string | undefined | If set, saves values to localStorage under this key |
Frequently asked.
If you have a question that isn't here, open an issue on GitHub — we'd rather add it to the docs than answer it twice.
Things in the air.
Theme-aware Tailwind output (p-16 instead of p-[64px] when your config allows)
Save-to-source-file via a build plugin (Vite / Next)
Preset control bundles (container, text, button, …)
Component-library-specific adapters (maptiveui-tunable-shadcn, etc.)
A full interactive site at maptiveui.dev
Ready to tune?
Install, wrap a component, hit save. Star the repo to follow updates as the rest of the Maptive UI family lands.