Inputs and selection
Range selector
trackless chart range (1D·1W·1M·1Y·ALL), active is a filled disc
function RangeSelectorDemo() { const [range, setRange] = React.useState<(typeof RANGES)[number]['value']>('1m'); return ( <View className="w-full gap-3"> <RangeSelector options={RANGES} value={range} onChange={setRange} /> <Text className="text-muted-foreground text-sm">Showing: {range.toUpperCase()}</Text> </View> );}Usage
For the time window over a chart. Use SegmentedControl instead when the options switch content rather than a period.
API
<RangeSelector options value onChange />Get it
Already in every copy of the native kit:
import { RangeSelector } from '@/components/kit/range-selector';Details
- Exports
RangeSelector- Installs with
- @halftone-native/lib-haptics, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- time range, chart range, 1D 1W 1M, period
- Registry JSON
- /r/native/range-selector.json
function RangeDemo() { const [r, setR] = React.useState<'1W' | '1M' | '3M' | '1Y' | 'ALL'>('1M'); return <RangeSelector aria-label="Chart range" className="w-full max-w-md" options={(['1W', '1M', '3M', '1Y', 'ALL'] as const).map((v) => ({ value: v, label: v }))} value={r} onChange={setR} />;}Usage
For the time window over a chart. Use SegmentedControl when the options switch content rather than a period.
API
<RangeSelector options value onChange aria-label />Get it
Already in every copy of the web kit:
import { RangeSelector } from '@/components/kit/range-selector';Details
- Exports
RangeSelector- Packages
- cn@^0.5.2
- Also searched as
- time range, period picker
- Registry JSON
- /r/web/range-selector.json
Agents: the whole registry is at /llms.txt.