computeVariableRange
input
Compute visible range for variable-height items
Terminal
$termuijs render compute-variable-range
Installation
$ bunx termuijs add compute-variable-range
Copies the source into src/components/compute-variable-range/ and installs .
Usage
ts
import { computeVariableRange } from '@termuijs/widgets'ts
const [value, setValue] = useState('')
<computeVariableRange
value={value}
onChange={setValue}
placeholder="Enter text..."
/>API Reference
computeVariableRange
| 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 |