diff --git a/apps/docs/src/content/components/slider.mdx b/apps/docs/src/content/components/slider.mdx index 19e1b78..c4c5d59 100644 --- a/apps/docs/src/content/components/slider.mdx +++ b/apps/docs/src/content/components/slider.mdx @@ -5,7 +5,6 @@ links: source: https://github.com/lmsqueezy/wedges/blob/main/packages/wedges/src/components/Slider/Slider.tsx radix: https://radix-ui.com/primitives/docs/components/slider --- - ### Usage @@ -18,8 +17,141 @@ import { Slider } from "@lemonsqueezy/wedges"; ``` +For more advanced usage, you can use the `Slider.Root` component to compose your own avatar. These components include pre-defined styles and accessiblity features. + +```tsx showLineNumbers + + + + + + +``` + ### API Reference +The Slider component is built on top of the Radix Slider primitive. + +#### Slider + +The Wedges component of the Slider. In most cases this is the only Slider component you will need to use. + + + +#### Slider.Root + +Contains all the parts of a slider. It will render an `input` for each thumb when used within a `form` to ensure events propagate correctly. + + + + + +#### Slider.Track + +The track that contains the `Slider.Range`. + + + + + +#### Slider.Range + +The range part. Must live inside `Slider.Track`. + + + + + +#### Slider.Thumb + +The range part. Must live inside `Slider.Track`. + + + + + ### Accessibility Adheres to the Slider WAI-ARIA design pattern.