orn-ui
Atom

Card

Requires <UIProvider> — Getting Started →

Installation

Install just this component (copies the source into your project, no npm dependency)

npx orn-ui add card

Or install the whole package and import it

pnpm add orn-ui
import { Card } from 'orn-ui/card';
Depends on:core (theme + icons)

Usage

  • when to use — Grouping related content into a surface: a summary, a list item with several lines, a form block.
  • composition — It brings padding, radius and elevation, nothing else — the content inside is entirely yours.
  • style — Adjust spacing or width here rather than wrapping the Card in another View.
Demo clip not recorded yet — see MEDIA.md

Variants

Default

<Card>
  <Title>Invoice #1042</Title>
  <Body>Due in 5 days · $340.00</Body>
</Card>

Composed

<Card>
  <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
    <Title>Invoice #1043</Title>
    <Badge label="PAID" variant="success" />
  </View>
  <KeyValueRow label="Total" value="$1,240.00" />
</Card>

Custom style

<Card style={{ backgroundColor: '#004cef', borderRadius: 24 }}>
  <Title style={{ color: '#fff' }}>Highlighted card</Title>
</Card>
Full demo source
const variants: VariantDef[] = [
  {
    label: 'Default',
    content: (
      <Card>
        <Title>Invoice #1042</Title>
        <Body>Due in 5 days · $340.00</Body>
      </Card>
    ),
  },
  {
    label: 'Composed',
    content: (
      <Card>
        <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 }}>
          <Title>Invoice #1043</Title>
          <Badge label="PAID" variant="success" />
        </View>
        <KeyValueRow label="Total" value="$1,240.00" />
      </Card>
    ),
  },
  {
    label: 'Custom style',
    content: (
      <Card style={{ backgroundColor: '#004cef', borderRadius: 24 }}>
        <Title style={{ color: '#fff' }}>Highlighted card</Title>
      </Card>
    ),
  },
];
return <VariantList variants={variants} />;

Props

NameTypeDefaultDescription
style?ViewStyle