# 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

Component: [`<Field>`](https://www.prongs.dev/docs/components/field.md) · Renders: `<input type="range">` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md)

## Example

```tsx
<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 for… | 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.range` (this page) |
| An exact amount someone types | [`field.number`](https://www.prongs.dev/docs/intents/field/number.md) |

## 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: [`input.range`](https://www.prongs.dev/docs/intents/ui.md#input-range)

## 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.range`](https://www.prongs.dev/docs/intents/ui.md#input-range) — A slider along a track

  ```
  h-4 w-full min-w-0 cursor-pointer accent-primary
  ```

- `field.range` (this page) — A value picked by sliding along a scale: volume, a playback position, a price limit. Give it min, max, value and an aria-label

Final classes

```
h-4 w-full min-w-0 cursor-pointer accent-primary
```

Element behaviour

```
{ type: 'range' }
```

Definition

```ts
'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' }],
},
```
