Plasma slider Pro
One payment, every Pro piece. $9 tomorrow.
Install
npx shadcn@latest add @mu-pro/plasma-sliderPro. Installs with your licence key through the @mu-pro registry; the key comes with Pro. Lands in components/mu/plasma-slider/ with the shared foundation.
Usage
import { PlasmaSlider } from "@/components/mu/plasma-slider/PlasmaSlider";
<PlasmaSlider label="Charge limit" defaultValue={80} format="{value}%" scale={[0, 25, 50, 75, 100]} />
<PlasmaSlider size="md" tone="heat" label="Volume" defaultValue={65} format="{value}%" />Use with an agent Beta
npx shadcn@latest add @mu-pro/uisdk/plasma-sliderOptional. An AI agent in your app can read and set this piece by name, and you can ask before anything it can’t undo. The piece itself doesn’t change; installs with your Pro key, like the piece. Built on UI SDK 0.1.0-beta.23, which is in beta too, so this add-on follows its releases.
Source
How it works
Building with an agent? Hand it a ready prompt for this piece.
Input and reduced motion
- Pointer / touch: a drag moves the nub by the hand's travel from where it is, never jumping to the finger; the value is decided under the finger, and on release the nub glides onto the step. A press that travels under 3px is a click: the nub glides to it. The nub squashes (at most 16% wider) while held. Escape, or the page taking a vertical swipe as a scroll, puts the value back. A vertical swipe on a phone still scrolls the page.
- Keyboard: it is a native range input, so Tab reaches it and its ring traces the nub. Arrows step, Page Up and Down move a tenth, Home and End jump; each lands within
--mu-press. - Reduced motion: the nub jumps and the plasma is a still picture; a drag still tracks and snaps on release. At rest, off screen and after the light has coasted to still (1.2s), nothing runs.
Props
| Prop | Default | What it does |
|---|---|---|
value | — | min–max | the value, controlled; pair with onValueChange |
defaultValue | min | min–max | the starting value, uncontrolled |
onValueChange | — | (value) => void | every change a person makes, as it is made: each step a drag crosses, each key, a click on the track |
onValueCommit | — | (value) => void | the value a person settled on: on release, a click or a key; save here |
min, max, step | 0, 100, 1 | numbers | the range; a drag decides the step under the finger and lands on it |
size | "lg" | "lg", "md", "sm" | the groove: 50, 16 or 8px tall |
tone | "status" | "status", "heat" | the light's ramp: ember, amber, mint (full is good) or ember, amber, warm white |
marks | — | a count, or values (number or { value, label }) | dots in the groove; their labels show on hover (after a short wait), on keyboard focus and while held |
scale | — | values (number or { value, label }) | labels always printed 12px under the groove |
format | "{value}" | a template or (value) => string | the words for a value: aria-valuetext and the marks' labels |
label | — | text | the accessible name (or pass aria-labelledby through a wrapper's label) |
name | — | text | posts the value with a <form> (a native range input carries it) |
disabled | false | boolean | 50%, not-allowed, no input |
className | — | — | added to the root |
Sound
None. It loads in silence.
None: a slider used many times a minute stays silent.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.
A soft-rubber slider whose insert is plasma light: drag it and its colour runs from ember to amber to mint with the value.
For volume, intensity and single valuesMore in Controls & forms