Control Label
control-labelFoundationsEvery control in the kit labels itself through this, which is why a panel of mixed controls lands on one visual rhythm. Use it directly when you build a control of your own and want it to sit correctly next to the built-in ones.
Ratio
slot
4:1Mode
slot
PeakInstall
Copies the source into your project. Anything it depends on comes with it.
$ npx shadcn add @syntho-ui/control-labelPulls in
control-theme
First time? Add the registry to your components.json once:
{
"registries": {
"@syntho-ui": "https://engine.syntho.app/r/{name}.json"
}
}Usage
Controlled or uncontrolled, whichever suits the surrounding state.
import { ControlLabel } from "@/components/ui/control-label"
<ControlLabel label="Ratio" value="4:1">
<MyCustomControl />
</ControlLabel>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | — | Caption above (or beside) the control. |
| value | ReactNode | — | Formatted readout below the control. |
| children | ReactNode | — | The control itself. |
| orientation | "vertical" | "horizontal" | "vertical" | Caption above the control, or to its left. |
| width | number | string | — | Width applied to the wrapper — keeps a row of knobs on a tidy grid. |
| labelId | string | — | Wired to the control's aria-labelledby. |
Interaction
- Drag with pointer capture, so the gesture keeps tracking past the edge of the control.
- Shift while dragging for a fine pass; release it mid-gesture and coarse tracking resumes.
- Double-click resets to
defaultValue. - Arrow keys step normally, Shift+arrow steps finely, PageUp/PageDown jump by ten, Home/End go to the extremes.
- Proper
sliderandswitchroles with livearia-valuetext, so a screen reader announces the formatted value rather than the raw number. - The scroll wheel adjusts the value while the pointer is over the control; stepped ranges move at least one declared step per notch by default.