How should shadcn-ui be structured in a large-scale production design system? #9756
-
|
Hi everyone, I’m using I’d like guidance on: → Should components be wrapped instead of modified directly? Looking for real-world best practices from teams using Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The safest way to customize shadcn-ui components in production is to treat them as your internal design system — not as a dependency you modify directly. Since shadcn-ui copies components into your project, you have full control. But to keep things maintainable:
Instead of heavily modifying the original component file, create wrapper components: This keeps upstream structure intact.
If a component exposes
Try not to rename props or alter internal logic unless absolutely necessary. Keep modifications stylistic when possible.
Since components are copied, future updates won’t apply automatically. Periodically check the official repo changelog and compare diffs before upgrading.
In large apps, consider: This separation prevents mixing upstream code with product-specific logic. In production, this approach:
|
Beta Was this translation helpful? Give feedback.
The safest way to customize shadcn-ui components in production is to treat them as your internal design system — not as a dependency you modify directly.
Since shadcn-ui copies components into your project, you have full control. But to keep things maintainable:
Instead of heavily modifying the original component file, create wrapper components:
This keeps upstream structure intact.
If a co…