Card
A composable content surface for grouping headers, metrics, media, and actions.
Dependencies
Copy below cli
npx shadcn add @bjork-ui/primitive-cardHow to use
import { BjorkCard, BjorkCardHeader, BjorkCardTitle } from "@/components/bjork-ui/primitives";export function Demo() { return ( <BjorkCard> <BjorkCardHeader> <BjorkCardTitle>Archive pulse</BjorkCardTitle> <BjorkBadge variant="accent">Live</BjorkBadge> </BjorkCardHeader> <BjorkCardContent>42 copied components this week.</BjorkCardContent> </BjorkCard> );}
Props
variantsurface | elevated | quiet | interactiveControls depth and hover behavior. Interactive adds pointer treatment and motion.
paddingnone | sm | md | lgKeeps repeated cards aligned without custom wrapper spacing.
roleHTML roleSet role='button' when the full card is clickable so motion and accessibility agree.
slotsHeader | Title | Description | Content | FooterUse the slots to keep typography, gaps, and action placement consistent.
Archive pulse
Basic shell
Use the base card when the surface only needs one compact container and soft inset light.
<BjorkCard> <BjorkCardHeader> <BjorkCardTitle>Archive pulse</BjorkCardTitle> </BjorkCardHeader> <BjorkCardContent> 42 copied components this week. </BjorkCardContent></BjorkCard>Archive pulse
Weekly component activity.
Elevated card
Use elevated when a card should sit above nearby surfaces without changing the structure.
<BjorkCard variant="elevated" padding="lg"> <BjorkCardHeader> <div> <BjorkCardTitle>Archive pulse</BjorkCardTitle> <BjorkCardDescription> Weekly component activity. </BjorkCardDescription> </div> <BjorkBadge variant="accent">Live</BjorkBadge> </BjorkCardHeader></BjorkCard>Draft set
IdleQuiet card
Use quiet when repeated cards need separation without heavy shadows.
<BjorkCard variant="quiet" padding="sm"> <BjorkCardHeader> <BjorkCardTitle>Draft set</BjorkCardTitle> <BjorkBadge variant="muted">Idle</BjorkBadge> </BjorkCardHeader> <BjorkCardContent> Low-emphasis card treatment for dense stacks. </BjorkCardContent></BjorkCard>Gallery card
bjorkInteractive card
Use for gallery-style cards. Add role and tabIndex when the whole card acts like a button.
<BjorkCard variant="interactive" padding="sm" role="button" tabIndex={0}> <PreviewImage /> <BjorkCardFooter>Open component</BjorkCardFooter></BjorkCard>Archive pulse
Weekly component activity.
Header anatomy
Header, title, description, content, and footer are separate so dense product cards stay aligned.
<BjorkCardHeader> <div> <BjorkCardTitle>Archive pulse</BjorkCardTitle> <BjorkCardDescription> Weekly component activity. </BjorkCardDescription> </div> <BjorkBadge variant="accent">Live</BjorkBadge></BjorkCardHeader>