Loading preview
Coffee Order Dial
InputsA café dial for choosing a drink, with a cup that shows what goes into it.
A wall plate of rocker switches that light a row of pendant bulbs.
npx shadcn@latest add @venusui/light-switch-panelRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/light-switch-panel.tsxThe code behind the preview above.
light-switch-panel-demo.tsx
import { LightSwitchPanel } from "@/components/ui/light-switch-panel"
export default function LightSwitchPanelDemo() {
return (
<LightSwitchPanel
switches={[
{ id: "kitchen", label: "Kitchen", defaultOn: true },
{ id: "hall", label: "Hall" },
{ id: "porch", label: "Porch", defaultOn: true },
]}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| switches | { id: string; label: string; defaultOn?: boolean }[] | — | The switches, left to right. |
| value | string[] | — | Controlled ids that are on. |
| onValueChange | (on: string[]) => void | — | Called when a switch changes. |
All <div> props.
Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A café dial for choosing a drink, with a cup that shows what goes into it.
A graphic equalizer panel with faders, LED columns, a response curve and presets.
A star rating built on native radio buttons, with a read-only display mode.