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
Field intents
Example
<Field intent="field.range" id="range" name="range" />Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
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.rangethis pageAn exact amount someone types
field.number
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
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' }],
},