-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for custom theming with css variables in a css file #3
Comments
Hi, the custom theme is supported. To custom theme based on a built-in theme, you can try: presetShadcn({
color: {
base: 'neutral',
color: {
light: {
primary: '0 0% 100%',
},
},
},
}), To custom a full theme from scratch: presetShadcn({
color: {
name: 'custom',
light: {
primary: '0 0% 100%',
// other color
},
dark: {},
},
}), |
Okay, that works magic 😃😃 But I would love to propose a change to the api. Instead of having the topmost property be presetShadcn({
theme: { // use theme instead of color
name: 'custom',
light: {
primary: '0 0% 100%',
// other color
},
dark: {},
},
}), The |
How about just flat the color property? As we just custom color here. |
I don't really get. Could you give an example? Or do you mean something like this? presetShadcn({
color: {
base: 'neutral',
light: {
primary: '0 0% 100%',
},
},
}) |
Yes |
Well I guess that works well too |
Clear and concise description of the problem
Hello there,
First of all i want to thank you for this, its a game changer for someone like me who loves both unocss and shadcn/ui.
I would love to propose for more flexibility in the usage of this preset. When using shadcn/ui with tailwind, you get the flexibility of customizing your theme colors and values using the css variables provided to you through the tailwindcss file which is undoubtedly very useful.
I wonder if we could also have this preset give room for such customization.
Suggested solution
Here are some possible solutions.
1. Passing custom variable values to the preset
2. Switching to custom theme
We could have some sort of property that lets the preset know that we want to use custom theme values.
This will then let you set your values in a css file, without loading the inbuilt ones
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: