Rouse Track
Web (React)
A range input drawn as a field of bars that rise into a crest around the thumb.
Bars rest on the border token and fill with the primary ink up to the value, which is printed alongside. The crest follows the pointer and glides as you drag.
Installation
CLI
npx @modus-ui/cli add rouse-trackManual
- Copy the code from the component tab.
- Create a file at
components/ui/rouse-track.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | any | - | - |
| defaultValue | number | 50 | - |
| onChange | any | - | - |
| min | number | 0 | - |
| max | number | 100 | - |
| step | number | 1 | - |
| bars | number | 48 | - |
| height | number | 56 | - |
| restHeight | number | 12 | - |
| gap | number | 4 | - |
| fillColor | string | "hsl(var(--primary))" | - |
| trackColor | string | "hsl(var(--border))" | - |
| crestColor | string | "" | - |
| sensitivity | number | 1 | - |
| reach | number | 6 | - |
| skew | number | 0.6 | - |
| glide | number | 0.3 | - |
| smoothing | number | 100 | - |
| showValue | boolean | true | - |
| formatValue | any | - | - |
| disabled | boolean | false | - |
| ariaLabel | string | "Value" | - |
Comments