Skip to content
DocsComponentsTemplatesThemesPlayground
Search
Switch to dark mode
Community
GitHub
Get started
Type to search
↑↓Navigate↵SelectEscClose
Components
Overview
App Shell
App Shell
useAppShellMobile
Aspect Ratio
Avatar
Avatar
Avatar Group
Avatar Group Overflow
Avatar Status Dot
Badge
Banner
Blockquote
Breadcrumbs
Breadcrumb Item
Breadcrumbs
Button
Button
Button Group
Icon Button
Toggle Button
Toggle Button Group
Calendar
Card
Card
Clickable Card
Selectable Card
Carousel
Chat
Chat Composer
Chat Composer Drawer
Chat Composer Input
Chat Composer Token Element
Chat Dictation Button
Chat Layout
Chat Layout Scroll Button
Chat Message
Chat Message Bubble
Chat Message List
Chat Message Metadata
Chat Send Button
Chat System Message
Chat Tokenized Text
Chat Tool Calls
Checkbox
Checkbox Input
Checkbox List
Checkbox List Item
Citation
Code
Code Block
Collapsible
Collapsible
Collapsible Group
useCollapsible
Command Palette
Command Palette
Command Palette Empty
Command Palette Footer
Command Palette Group
Command Palette Input
Command Palette Item
Command Palette List
Context Menu
Context Menu
Context Menu Item
Date Input
Date Input
Date Range Input
Date Time Input
Dialog
Alert Dialog
Dialog
Dialog Header
useImperativeAlertDialog
useImperativeDialog
Divider
Dropdown Menu
Dropdown Menu
Dropdown Menu Item
Empty State
Field
Field
Field Label
Field Status
Input Group
Input Group Text
File Input
Heading
Hover Card
Hover Card
useHoverCard
Icon
Item
Kbd
Layout
Center
Form Layout
Grid
Grid Span
H Stack
Layout
Layout Content
Layout Footer
Layout Header
Layout Panel
Section
Stack Item
V Stack
Lightbox
Link
List
List
List Item
Markdown
Metadata List
Metadata List
Metadata List Item
More Menu
Navigation
Mobile Nav
Mobile Nav Toggle
Nav Heading Menu
Nav Icon
Side Nav
Side Nav Collapse Button
Side Nav Heading
Side Nav Item
Side Nav Section
Top Nav
Top Nav Heading
Top Nav Item
Top Nav Mega Menu
Top Nav Mega Menu Featured Card
Top Nav Mega Menu Item
Top Nav Menu
Number Input
Outline
Overflow List
Overlay
Pagination
Popover
Popover
usePopover
Power Search
Progress Bar
Radio
Radio List
Radio List Item
Resizable
Resize Handle
useResizable
Segmented Control
Segmented Control
Segmented Control Item
Selector
Multi Selector
Selector
Selector Option
Skeleton
Slider
Spinner
Status Dot
Switch
Table
Table
Table Cell
Table Header Cell
Table Row
useTableColumnSettings
useTableFiltering
useTableFilterState
useTablePagination
useTableSelection
useTableSelectionState
useTableSortable
Tabs
Tab
Tab List
Tab Menu
Text
Text Area
Text Input
Thumbnail
Time Input
Timestamp
Toast
Toast
useToast
Token
Tokenizer
Toolbar
Tooltip
Tooltip
useTooltip
Tree List
Typeahead
Base Typeahead
Typeahead
Typeahead Item
Utilities
Layer Provider
Link Provider
Media Theme
Syntax Theme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useLayer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useStreamingText
useTheme
DocsChangelogCommunityBlogComponentsTemplatesThemesPlayground
GitHub
Facebook
Instagram
Threads
X
Terms of usePrivacy policy
©2026 Meta Platforms, Inc.
Card@astryxdesign/core v0.0.15 · Card

Usage

Card is a bordered, elevated container for discrete, self-contained items: things you could reorder, remove, or interact with independently. Cards are NOT the default layout tool. Most content groups don't need a container at all; spacing and alignment create visual grouping naturally. Only reach for a Card when items need clear interaction boundaries or visual comparison in a grid.
ts
import {Card} from '@astryxdesign/core/Card'

Best practices

GuidancePractices
DoAsk "could I reorder or remove this independently?" If yes, it's a card. If no, it's just a section of the page: use a heading + Stack or Section.
DoUse cards for discrete items: a single user profile, a single notification, a single metric, a product in a grid. Each card represents one "thing" with clear interaction boundaries.
DoSpacing and alignment alone create visual grouping. Not everything needs a container; try removing the card and see if the grouping is still clear from whitespace and typography.
DoKeep padding consistent across sibling cards so they align visually in a grid or list.
DoPair a card with Layout when you need a structured header, scrollable content, and footer with actions.
Don'tDefault to cards for visual grouping. A heading + Stack with proper spacing creates hierarchy without adding borders everywhere. Cards should be the exception, not the default.
Don'tWrap page sections in cards. "General Settings", "Notification Preferences", form groups: these are page regions, use Section or heading + stack.
Don'tCreate identical card grids (icon + heading + text, repeated). Vary the layout or question whether cards are needed at all.
Don'tNest cards inside other cards; flatten the hierarchy or use spacing and dividers instead.
Don'tUse color variants for status; use Banner or Badge for that. Color cards are for categorization.

Examples

Common configurations, variations, and states.
Card — Callout
Muted-variant cards for tips, notes, or supplementary information. Use when content should be visually distinct but not prominent. The muted variant uses a wash background instead of the elevated default, making it feel recessed rather than raised. Works well in sidebars, help panels, or inline callouts.
Card — Variants
Default, muted, and color variants side by side. Use color variants to categorize cards visually, like team colors, project tags, or content types. Each color uses the corresponding background token from the theme, so they adapt to light and dark mode automatically.
Card — Layout
A card with a structured header, content area, and footer with action buttons. Use for forms, dialogs, or settings panels that need clear sections. Pair Card with Layout to get automatic dividers between header, content, and footer. The footer aligns actions to the right by default.
Card — Simple
A card with a heading and body text. Use for summaries, descriptions, or any grouped content that needs visual separation from the page. The card handles its own border, background, and padding; just pass your content as children. Set a width to constrain it, or leave it to fill the parent.