Skip to content

Compound component dot notation #178

Closed Answered by vladmoroz
ddu08 asked this question in Q&A
Discussion options

You must be logged in to vote

Radix Themes exports both the dot notation version and individual parts for every component. Our personal preference when building UIs is to use the dot notation, but Next.js server components don't support that well yet, so we'll have to see how that pans out over time. As for tree-shaking, for multi-part components you usually need all or almost all of the parts anyway. We do have some tree-shaking issues, but that's not related to dot notation and will be fixed soon.

Radix Primitives provides each primitive as a separate package, and how your import them defines whether you get dot notation or the individual parts of a primitive.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vladmoroz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants