---
layout: '@/layouts/Doc.astro'
title: Range
---
import Example from '@/components/Example.astro'
import rangeStyle from '@webtui/css/components/range.css?raw'
import boxStyle from '@webtui/css/utils/box.css?raw'
A range slider input
`}
/>
## Import
```css
@import '@webtui/css/components/range.css';
```
## Usage
```html
```
## Examples
### Basic Range
`}
/>
### Track Styles
`}
/>
### With Labels
Volume
`}
/>
### Disabled State
Enabled
`} />
## Reference
### Properties
Use CSS custom properties to customize the range appearance
- `--range-track-color`: Color of the slider track
- `--range-thumb-color`: Default color of the slider thumb
- `--range-thumb-color-focus`: Color of the slider thumb when focused or active
- `--range-track-height`: Height of the track
```css
#my-range {
--range-track-color: var(--background2);
--range-thumb-color: var(--foreground2);
--range-thumb-color-focus: var(--foreground0);
}
```
### Extending
To extend the Range stylesheet, define a CSS rule on the `components` layer
```css
@layer components {
input[type='range'] {
&[variant-='accent'] {
--range-track-color: var(--accent-color);
--range-thumb-color: var(--accent-foreground);
}
/* ... */
}
}
```
### Scope
- All `` elements
```css
input[type='range'] {
/* ... */
}
```