field.range
A value picked by sliding along a scale: volume, a playback position, a price limit. Give it min, max, value and an aria-label
Read https://www.prongs.dev/docs/intents/field/range.md and tell me whether field.range fits what I am building.Field intents
Example
<Text intent="text.label" as="label" htmlFor="volume">Volume</Text>
<Field intent="field.range" id="volume" min={0} max={100} value={volume} onChange={(e) => setVolume(+e.target.value)} />Connections
Choosing between neighbours
If it is
Use
A value picked by sliding along a scale: volume, a playback position, a price limit. Give it min, max, value and an aria-label
field.rangeAn exact amount someone types
field.number
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.
What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.
How field.range resolves, and its definition
Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.
input.rangeA slider along a track
h-4 w-full min-w-0 cursor-pointer accent-primary
field.rangeA value picked by sliding along a scale: volume, a playback position, a price limit. Give it min, max, value and an aria-label
h-4 w-full min-w-0 cursor-pointer accent-primary
{ type: 'range' }'field.range': {
kind: 'semantic',
description: 'A value picked by sliding along a scale: volume, a playback position, a price limit. Give it min, max, value and an aria-label',
refs: ['input.range'],
binding: { behavior: { type: 'range' } },
notFor: [{ context: 'an exact amount someone types', instead: 'field.number' }],
},