tailwindcss-radix-colors
tailwindcss-radix-colors copied to clipboard
Option to have only semantic classes
One thing the I like the most about radix ui colors is the ability to have enough flexibility using only the semantic meaning as stated in https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale
It think a good addition is having an option to disable the access to the low level color/step.
declare interface TailwindCSSRadixColorsOptions {
/**
* Disable the semantics classes, such as `bg-red-solid`.
*
+ * @deprecated Use `class: "step"` instead
*/
disableSemantics?: boolean;
/**
* Choose which class `bg-red-solid`.
*
* @default 'both'
*/
+ class?: "semantic" | "step" | "both";
}
Without releasing a major, disableSemantics
when used sets class
to step
, but having class
precedence.
If you are interested I can take a look and try to make a PR.