ns-ui
An accessible switch drawn entirely in box-drawing and block characters, in the register of a physical knife switch: the blade fills one cell at a time and the handle glyph spins through the throw.
Use when a binary control where the mechanical, character-by-character throw is a deliberate flourish and a printed OFF/ON legend belongs in the UI. Reach for switch-frost instead for an iOS-pill switch with a soft, decorative animation and no printed text legend.
Install
npx shadcn add https://design.helpmarq.com /r/switch-ascii-knife.jsonns-ui / switch-ascii-knife
Space or Enter throws the switch; the blade fills one cell at a time and the handle spins mid-transit.
| Prop | Type | Default | Description |
|---|---|---|---|
| checked? | boolean | — | controlled state; omit for uncontrolled |
| defaultChecked? | boolean | — | — |
| onCheckedChange? | (checked: boolean) => void | — | — |
| disabled? | boolean | — | — |
| className? | string | — | — |
| aria-label? | string | — | — |