Custom Variants
LuxeyUI allows you to create new variants for components that better suit your project's needs. This can be done quite easily.
All you have to do is to add new selectors
and properties
in your CSS file for that specific component.
Note: For better understanding the customization process please visit the Override Styles documentation.
Creating variants for Components
Let's customize the Button
component and add a new variant to it.
Using Vanilla CSS
Using Vanilla CSS, it is super simple. Take this for example:
This is just a basic example, you can do a lot more if you know good CSS.
Using TailwindCSS with PostCSS
Using TailwindCSS, it is the exact same process. But sometimes you might need to use duplicate selectors
in order to work properly. Below is an example about how to implement that:
Like these, you can add your custom variants within your css file using either Vanilla CSS or TailwindCSS.
Note: You can see the source code of every components in the github repository or you can see the class names of the components to customize as needed.