computeRange
input
Compute visible range for fixed-height items
Terminal
$termuijs render compute-range
Installation
$ bunx termuijs add compute-range
Copies the source into src/components/compute-range/ and installs .
Usage
ts
import { computeRange } from '@termuijs/widgets'ts
const [value, setValue] = useState('')
<computeRange
value={value}
onChange={setValue}
placeholder="Enter text..."
/>API Reference
computeRange
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | required | Controlled value |
onChange | (v: string) => void | required | Change callback |
placeholder | string | — | Placeholder text |
isDisabled | boolean | false | Disable interaction |
autoFocus | boolean | false | Focus on mount |