Knit UI
GitHub

Playground

Loading playground…

false
Playground
<Card
  withBorder={false}
  orientation="vertical"
  padding="$lg"
/>

Examples

Compound API

Card.Header / Card.Footer compound sub-components in a fully composed card.

Loading example…

Compound APISourceStorybook

With Sections

Card.Section spans edge-to-edge, negating the card padding; withBorder adds dividers.

Loading example…

With SectionsSourceStorybook

Horizontal Orientation

Horizontal orientation lays out children side by side — useful for media + text layouts.

Loading example…

Horizontal OrientationSourceStorybook

Shadow Depths

Multiple shadow depths side by side — xs through xl.

Loading example…

Shadow DepthsSourceStorybook

With Border

withBorder outlines the card boundary without adding a shadow.

Loading example…

With BorderSourceStorybook

Plain

Minimal card with no sub-components — plain body content only.

Loading example…

PlainSourceStorybook

Styles

Per-slot styles targets individual parts — here the header and footer.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefined——
radius systemstring | number | undefined
unset · xs · sm · md · lg · xl
—Border-radius token.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
unset · xs · sm · md · lg · xl
—Drop-shadow depth token.
styles systemSlotStyles<CardStyles> | undefined—Per-slot style sugar — props spread onto the matching child parts.
theme systemThemeName | null | undefined—Applies a theme to this element

Style slots

Every part of Card can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotTargets
footerProps for Card.Footer children.
headerProps for Card.Header children.
sectionProps for Card.Section children.
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 500 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.

Edit this page on GitHub