Repository navigation
Replies: 2 comments
|
The registry system actually does support distributing custom CSS — it's just not well documented. The field you want is The
|
|
This is now an officially documented registry feature: put the CSS in the registry item A minimal v4 item can be: {
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "fancy-card",
"type": "registry:component",
"css": {
"@layer components": {
".fancy-card": {
"background-color": "var(--color-card)",
"box-shadow": "var(--shadow-lg)"
}
},
"@utility content-auto": {
"content-visibility": "auto"
}
}
}The same field supports Use Official schema and examples: |
Uh oh!
There was an error while loading. Please reload this page.
Hi, so I am working on a ui library that is distributed via the cli/registry system, and I need to add some custom tailwind classes that can't be added via regular classes, so I gotta edit the css manually, but I don't see any docs nor posts on how to distribute custom css, besides adding css variables. Is there a way to do that, or should I tell the users to copy paste the css manually?
All reactions