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

Feature Request: Add className Property to Components in the Library #1037

Open
mohamedsalem401 opened this issue Oct 14, 2023 · 2 comments
Open

Comments

@mohamedsalem401
Copy link
Member

I would like to request the addition of a className property to the components in the library. This property would allow users to easily apply custom CSS classes to components, enabling greater flexibility in styling and customization.

Use Case:

<Excel className="w-full" />
<LineChart
     className="h-5"
/>

Why It's Needed:
Currently, the components have limited customization options, making it challenging for users to adapt the library to their specific design requirements. By adding a className property, users can apply their own styles without having to override the component's default styles, providing a more seamless and flexible experience.

Implementation Details:
I propose adding a className property to each component, which would accept a string of CSS classes. This property should be merged with the component's existing classes to ensure that it works seamlessly with the library's styling.

@mohamedsalem401
Copy link
Member Author

mohamedsalem401 commented Oct 14, 2023

I can complete this task within a few hours if you believe it's ok to proceed.

@rufuspollock
Copy link
Member

@mohamedsalem401 really clear need. My question is what is best practice for "headless" components here - that would be the optimal way to proceed.

Otherwise a backup is using the className approach you describe.

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

No branches or pull requests

2 participants