Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
fgatti675 committed Oct 18, 2024
1 parent 9ce75c3 commit 421ea7c
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ code blocks
This editor is in development and your **feedback** is very **valuable**. The content of this editor is only stored locally in this demo.
- [x] Star us on [GitH](https://github.com/steven-tey/novel)[ub](https://github.com/firecmsco/firecms)
- [x] Star us on [GitHub](https://github.com/firecmsco/firecms)
- [x] Leave us your comments on [Discord](https://discord.gg/fxy7xsQm3m)`
79 changes: 79 additions & 0 deletions website/docs/components/slider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
id: slider
title: Slider
sidebar_label: Slider
---

Sliders allow users to input a value by sliding a handle along a track. This component is highly customizable with various options for orientation, step, range, and more.

## Usage

To use the `Slider`, import it from your components library and configure it using props such as `min`, `max`, `step`, `value`, and others.



import CodeSample from "../../src/CodeSample";
import CodeBlock from "@theme/CodeBlock";
import SliderBasicDemo from "../../samples/components/slider/slider_basic";
import SliderBasicSource from "!!raw-loader!../../samples/components/slider/slider_basic";
import SliderRangeDemo from "../../samples/components/slider/slider_range";
import SliderRangeSource from "!!raw-loader!../../samples/components/slider/slider_range";
import SliderSmallDemo from "../../samples/components/slider/slider_small";
import SliderSmallSource from "!!raw-loader!../../samples/components/slider/slider_small";
import SliderDisabledDemo from "../../samples/components/slider/slider_disabled";
import SliderDisabledSource from "!!raw-loader!../../samples/components/slider/slider_disabled";
import SliderInvertedDemo from "../../samples/components/slider/slider_inverted";
import SliderInvertedSource from "!!raw-loader!../../samples/components/slider/slider_inverted";

## Basic Slider

A basic example of the Slider component with default settings.


<CodeSample>
<SliderBasicDemo/>
</CodeSample>

<CodeBlock language="tsx">{SliderBasicSource}</CodeBlock>

## Range Slider

An example of a range slider with two handles that allow users to select a range of values.

<CodeSample>
<SliderRangeDemo/>
</CodeSample>

<CodeBlock language="tsx">{SliderRangeSource}</CodeBlock>

## Small Slider

A smaller version of the Slider component with a reduced size.

<CodeSample>
<SliderSmallDemo/>
</CodeSample>

<CodeBlock language="tsx">{SliderSmallSource}</CodeBlock>


## Disabled Slider

Illustrating how to use the `disabled` prop to create a non-interactive Slider.


<CodeSample>
<SliderDisabledDemo/>
</CodeSample>

<CodeBlock language="tsx">{SliderDisabledSource}</CodeBlock>

## Inverted Slider

An example of an inverted slider where the value decreases from left to right.

<CodeSample>
<SliderInvertedDemo/>
</CodeSample>

<CodeBlock language="tsx">{SliderInvertedSource}</CodeBlock>

0 comments on commit 421ea7c

Please sign in to comment.