ProCard API
ProCard provides an enhanced card component with features like collapsible sections, tabs, nested layouts, and grid support.ProCardProps
Card title.
Card subtitle displayed next to the title.
Tooltip for the title.
Extra content in the card header (top right corner).
Whether the header has a divider line.
Card type.
default- Standard cardinner- Inner card for nested layouts
Card variant.
outlined- Card with borderborderless- Card without border
Card size.
Loading state. Can be a boolean or custom loading component.
Whether card can be hovered (shows shadow effect).
Ghost mode - removes padding and background.
Whether to show box shadow.
Card action buttons displayed at the bottom.
Card cover image or content.
Collapsible
Whether the card is collapsible.
false- Not collapsibletrueor'icon'- Collapse icon in header'header'- Entire header is clickable
Controlled collapsed state.
Default collapsed state.
Callback when collapse state changes.
Custom render for the collapse icon.
Layout & Grid
Card layout.
default- Normal layoutcenter- Vertically center content
Flex direction for nested child cards.
Whether child cards wrap to new lines.
Gap between child cards.
number- Horizontal and vertical gap[horizontal, vertical]- Different horizontal and vertical gaps
Column span in grid layout (24-column grid system).Can be responsive:
Style for the column wrapper.
Split child cards with divider lines.
vertical- Vertical dividerhorizontal- Horizontal divider
Tabs
Tab configuration for the card.
Selectable
Whether the card is selected (shows border highlight).
Callback when card is clicked (for selectable cards).
Styling
Semantic styles object (aligned with Ant Design 5 Card).
Semantic class names (aligned with Ant Design 5 Card).
Additional CSS class name.
Root element CSS class name.
Inline styles for the card.
Inline styles for the card body (deprecated, use
styles.body).Inline styles for the card header (deprecated, use
styles.header).CSS class prefix.
ProCard.TabPane
Tab pane component for use with ProCard tabs.Unique key for the tab.
Tab label.
Disable the tab.
Props to pass through to the ProCard for this tab.
ProCard.Group
Group multiple ProCards together.Group title.
Flex direction for cards in the group.
Gap between cards.
Ghost mode for the group.
ProCard.Divider
Divider for splitting card sections.Divider orientation.
Usage Examples
- Basic Usage
- Collapsible
- Grid Layout
- With Tabs
- Split Layout
- Responsive Grid