-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged master into feature branch; renamed range to slider
- Loading branch information
Showing
17 changed files
with
127 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-1.58 MB
packages/components/public-storybook/images/slider/coffee_unsplash.jpg
Binary file not shown.
Binary file added
BIN
+4.7 KB
packages/components/public-storybook/images/slider/range-slider-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.5 KB
packages/components/public-storybook/images/slider/range-slider-states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.3 KB
packages/components/public-storybook/images/slider/slider-anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.86 KB
packages/components/public-storybook/images/slider/slider-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.6 KB
packages/components/public-storybook/images/slider/slider-variants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
import { Meta } from '@storybook/blocks'; | ||
|
||
import * as SliderStories from './slider.stories'; | ||
|
||
import RangeSliderDefault from '../../../public-storybook/images/slider/range-slider-default.png'; | ||
import RangeSliderStates from '../../../public-storybook/images/slider/range-slider-states.png'; | ||
import SliderAnatomy from '../../../public-storybook/images/slider/slider-anatomy.png'; | ||
import SliderDefault from '../../../public-storybook/images/slider/slider-default.png'; | ||
import SliderStates from '../../../public-storybook/images/slider/slider-states.png'; | ||
import SliderVariants from '../../../public-storybook/images/slider/slider-variants.png'; | ||
|
||
<Meta of={SliderStories} /> | ||
|
||
# Slider | ||
The slider component allows users to select a value or a range of values within a specified numeric range. It provides a visual representation of a continuous scale with adjustable handles, enabling users to slide and select desired values. | ||
|
||
## Usage | ||
|
||
### When to use | ||
- When you need to allow users to select a specific value or a range of values within a defined numeric range. | ||
- When precise control over the selected values is required, such as input ranges. | ||
|
||
### When not to use | ||
- If the range of values is extremely limited or has a small number of discrete options. | ||
- If the input requires highly precise or specific numeric values. | ||
- If the available space for the range slider component is constrained, and displaying the full range or a large number of values becomes visually challenging. | ||
- If the numeric range is complex or non-linear, with varying intervals or irregular increments. | ||
|
||
## Types | ||
|
||
### Slider | ||
This variant allows users to select a single value within a specified range. It consists of a track and a draggable thumb that can be moved along the track to set the desired value. | ||
<img src={SliderDefault} alt="Slider Default" width="50%" /> | ||
|
||
#### Variants | ||
Depending on use cases, there are various value options which can be displayed. | ||
<img src={SliderVariants} alt="Slider Variants" /> | ||
|
||
#### States | ||
<img src={SliderStates} alt="Slider States" /> | ||
|
||
### Range Slider | ||
This variant allows users to select a range of values within a specified numeric range. It consists of a track and two draggable thumbs that can be adjusted to set the desired range. | ||
<img src={RangeSliderDefault} alt="Range Slider Default" width="50%" /> | ||
|
||
|
||
#### States | ||
<img src={RangeSliderStates} alt="Range Slider States" /> | ||
|
||
## Anatomy | ||
<img src={SliderAnatomy} alt="Slider Anatomy" /> | ||
|
||
**Label (1)** | ||
Labels are optional but often included to provide textual representations of the minimum, maximum, or selected values on the slider. These labels are located above the slider component. | ||
|
||
**Fill (2)** | ||
The colored portion of the track that represents the selected amount. | ||
|
||
**Handle (3)** | ||
The draggable element that users can interact with to select a specific value or range on the slider. It moves along the track as the user drags it. | ||
|
||
**Track (4)** | ||
The horizontal bar that represents the entire range of values that the slider can span. | ||
|
||
**Range Slider (5)** | ||
In the range slider, the fill is the colored portion of the track that represents the selected range between the minimum and maximum values. It visually fills the space between the two handles, indicating the selected range. | ||
|
||
*** | ||
Check out the Figma component: **[Slider](https://www.figma.com/file/zPvPwPgb4EsYFXKC2nhzSG/Infineon-DDS-%7C-Main?type=design&node-id=15273-6407&mode=design&t=2lNZOOqATnlJOKBG-4)**. | ||
*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters