Skip to content

What is the justification for giving Text access to margin props, but not padding props? #463

Closed Answered by vladmoroz
seb-lean asked this question in Q&A
Discussion options

You must be logged in to vote

The layout props like padding are available specifically on layout components in order to facilitate easier spacing and sizing for run-of-the-mill elements that don't deserve to be named or componentised.

However, styling custom components is much more complex, especially when it comes to the interactive components like Accordion. No set of props would be sufficient to style things like that end-to-end without a full-blown styling solution.

I'd suggest you use your favourite styling tech when building custom components; see more in the docs:

https://www.radix-ui.com/themes/docs/overview/styling

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

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