Basic Usage
High-Level API
The simplest way to create a card using props:The card’s header title
Descriptive text displayed below the title
Main content area of the card
Footer section, typically for actions
Compositional API
For more control, compose the card using subcomponents:Card Components
card.root
The main card container with border, shadow, and rounded corners.card.header
Header section with padding for title and description.card.title
Large, semibold text for the card heading.card.description
Secondary text below the title.card.content
Main content area with consistent padding.card.footer
Footer section with flexbox layout for actions.Styling Classes
Access predefined class names viaui.card.class_names:
ROOT: Card container stylesHEADER: Header section stylesTITLE: Title text stylesDESCRIPTION: Description text stylesCONTENT: Content area stylesFOOTER: Footer section styles
Real Example
From demo atdemo/demo.py:
Implementation Details
From source code atreflex_ui/components/base/card.py:137:
- Uses component namespace pattern for flexible composition
- High-level wrapper automatically creates structure from props
- Each subcomponent has dedicated styling via data-slot attributes
- Fully customizable with
class_nameprop