Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom CSS Classes Support #11

Open
giuliano-abinbev opened this issue Apr 6, 2024 · 0 comments
Open

Custom CSS Classes Support #11

giuliano-abinbev opened this issue Apr 6, 2024 · 0 comments

Comments

@giuliano-abinbev
Copy link

The library currently supports a custom css class that goes along with range-slider in the root/wrapper element. This issue is more about allowing developer to completely replace all range-sliders classes with custom ones.

Motivation

Allowing developers to completely replaces the default css variables allows them to:

  • Support CSS Modules
  • Have more granular control
  • Avoid collisions (e.g. an app could already have a global range-slider class for something else)

Suggestion

Replace the className props with a classNames prop that accepts an object

type Props = {
   classNames?: {
      slider?: string,
      thumb?: string,
      range?: string,
   }
}

classNames should be optional as well as the keys, and default to the current classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant