-
Notifications
You must be signed in to change notification settings - Fork 630
Open
Description
The shadcn components don't accept a className prop, so there's no way to override or extend their styling from the spec.
For example, the Card component wraps children in <CardContent className="flex flex-col gap-3">. That forced gap-3 breaks compact layouts like stat cards — but there's no escape hatch to override it without creating a full custom component.
Suggestion
Add an optional className: z.string().nullable() to each shadcn component's props schema and forward it to the root element via cn():
// catalog.ts
Card: {
props: z.object({
// ...existing props
className: z.string().nullable(),
}),
}
// components.tsx
Card: ({ props, children }) => (
<Card className={cn(existingClasses, props.className)}>
...
</Card>
)This matches how shadcn/ui itself works — every component accepts className. It would let users fine-tune layout without needing to rewrite entire components.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels