strapi / design-system

Strapi.io's design system :rocket:
https://design-system.strapi.io
MIT License
472 stars 166 forks source link

[feat]: Slider Component To Represent Numerical Data #840

Open PaulBratslavsky opened 1 year ago

PaulBratslavsky commented 1 year ago

Slider Component to represent and select numerical data in a range.

Screenshot 2023-01-12 at 10 55 32 AM

A slider input component allows user to select a value from a range of values by moving a handle along a track. The component typically consists of three parts: the track, the handle, and the value display.

The track is the visual representation of the range of values, and it is usually represented by a horizontal or vertical bar. The handle is a small, draggable element that the user can move along the track to select a value. The value display is an optional element that shows the current value of the slider.

When the user moves the handle along the track, the value of the slider input component changes. The component will emit an event or callback that can be used to update the state of the application.

Slider Input component also has a wide range of customization options, such as the ability to set the minimum and maximum values, the increment of the value change, and display options like ticks, labels and different colors.

It is a great way to give users more control over their experience and to make it easy for them to make adjustments.

Why should this feature be included?

Many community members who work on plugins have mention this.

joshuaellis commented 1 year ago

Firstly, thanks Paul for raising this!!

Many community members who work on plugins have mention this.

Secondly, whilst they may have mentioned this it'd be great to understand their use cases for it so we can understand the significance, there's quite a lot to making this component and currently I can't quite see why you'd need a range in a CMS (although i'm probably wrong). Feel free to tag those individuals here!

PaulBratslavsky commented 1 year ago

@joshuaellis I am currently building a plugin to use open AI to generate seo descriptions and key words and would like to give users the ability to change setting via slider. Similar to this.

It is recommended to use Strapi Design System Components when building plugins but currently there is no slider component.

I can of course make my own, but if someone else needs a slider and they build there own it will start to add inconsistencies in design.

Screenshot 2023-01-12 at 11 20 14 AM

I am sure there might be other use cases if we had a custom field slider component that other people would use.

joshuaellis commented 1 year ago

Thanks!

Stack-Peter commented 4 months ago

Hello, from Brazil. Any news about the slider ?