radix-ui / themes

Radix Themes is an open-source component library optimized for fast development, easy maintenance, and accessibility. Maintained by @workos.
https://radix-ui.com/themes
MIT License
5.34k stars 190 forks source link

Left align Radio Card #486

Open penx opened 5 months ago

penx commented 5 months ago

In the first example for the Checkbox Card and Radio Card in the docs, the text is left aligned because it has a Flex child that sets this.

Screenshot 2024-05-02 at 15 37 05

https://www.radix-ui.com/themes/docs/components/checkbox-cards

Screenshot 2024-05-02 at 15 37 48

https://www.radix-ui.com/themes/docs/components/radio-cards

By default the alignment of contents within a checkbox/radio card is centered.

If the intention is to support left alignment of text in a checkbox/radio card item, could it be given a prop to set this, rather than requiring nesting a Flex within it?

If the intention is to discourage left alignment, could the example at the top of the docs be changed to something centre aligned? 😄

vladmoroz commented 4 months ago

The alignment choice is by design: