āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/sadmann7/diceui/components/angle-slider ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
npx shadcn@latest add "https://diceui.com/r/angle-slider"
```package-install
@radix-ui/react-slot
```
</Step>
<Step>
Copy the refs composition utilities into your `lib/compose-refs.ts` file.
<ComponentSource name="compose-refs" />
</Step>
<Step>
Copy the visually hidden input component into your `components/visually-hidden-input.tsx` file.
<ComponentSource name="visually-hidden-input" />
</Step>
<Step>
Copy and paste the following code into your project.
<ComponentSource name="angle-slider" />
</Step>
</Steps>
Import the parts and compose them together.
import {
AngleSlider,
AngleSliderRange,
AngleSliderThumb,
AngleSliderTrack,
AngleSliderValue,
} from "@/components/ui/angle-slider";
<AngleSlider>
<AngleSliderTrack>
<AngleSliderRange />
</AngleSliderTrack>
<AngleSliderThumb />
<AngleSliderValue />
</AngleSlider>
A slider with controlled state management and custom actions.
<ComponentTabs name="angle-slider-controlled-demo" />Use multiple thumbs to create angle ranges with minimum step constraints.
<ComponentTabs name="angle-slider-range-demo" />Slider variants with different themes.
<ComponentTabs name="angle-slider-themes-demo" />Integrate the angle slider with form validation and submission.
<ComponentTabs name="angle-slider-form-demo" />You can customize the appearance by targeting specific components:
Use [&>[data-slot='angle-slider-track-rail']] to style the background track:
<AngleSliderTrack className="[&>[data-slot='angle-slider-track-rail']]:stroke-green-100" />
<AngleSliderRange className="stroke-green-500" />
<AngleSliderThumb className="border-green-500 bg-green-50 ring-green-500/50" />
<AngleSliderValue className="text-green-600 dark:text-green-400" />
The main container component for the angle slider.
<AutoTypeTable path="./types/docs/angle-slider.ts" name="RootProps" />
<DataAttributesTable attributes={[ { title: "[data-disabled]", value: "Present when the angle slider is disabled.", }, ]} />
The circular track that represents the full range of possible values.
<AutoTypeTable path="./types/docs/angle-slider.ts" name="TrackProps" />
<DataAttributesTable attributes={[ { title: "[data-disabled]", value: "Present when the angle slider is disabled.", }, { title: "[data-slot='angle-slider-track-rail']", value: "Present on the rail of the track.", }, ]} />
The portion of the track that represents the selected range.
<AutoTypeTable path="./types/docs/angle-slider.ts" name="RangeProps" />
<DataAttributesTable attributes={[ { title: "[data-disabled]", value: "Present when the angle slider is disabled.", }, ]} />
The draggable handle for selecting values.
<AutoTypeTable path="./types/docs/angle-slider.ts" name="ThumbProps" />
<DataAttributesTable attributes={[ { title: "[data-disabled]", value: "Present when the angle slider is disabled.", }, ]} />
Displays the current value(s) with customizable formatting.
<AutoTypeTable path="./types/docs/angle-slider.ts" name="ValueProps" />
<DataAttributesTable attributes={[ { title: "[data-disabled]", value: "Present when the angle slider is disabled.", }, ]} />
The angle slider component includes comprehensive accessibility features:
<KeyboardShortcutsTable shortcuts={[ { keys: ["ArrowUp", "ArrowRight"], description: "Increase the value by one step.", }, { keys: ["ArrowDown", "ArrowLeft"], description: "Decrease the value by one step.", }, { keys: ["PageUp"], description: "Increase the value by ten steps.", }, { keys: ["PageDown"], description: "Decrease the value by ten steps.", }, { keys: ["Shift + Arrow Keys"], description: "Increase/decrease the value by ten steps.", }, { keys: ["Home"], description: "Set the value to the minimum.", }, { keys: ["End"], description: "Set the value to the maximum.", }, ]} />
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā