# KeyValueRow

> Atom — orn-ui

> ⚠️ Requires <UIProvider>: This component (like every orn-ui component) must render inside a <UIProvider> ancestor, or it throws at runtime. See https://orn-ui-docs.vercel.app/getting-started.md

> Runs on Expo SDK 54, 55, 56 and 57, and on bare React Native >=0.81 with react >=19.1. No native modules — works in Expo Go, no prebuild.

## Installation

Install just this component (copies the source into your project, no npm dependency)
```bash
npx orn-ui add key-value-row
```

Or install the whole package and import it
```tsx
pnpm add orn-ui
import { KeyValueRow } from 'orn-ui/key-value-row';
```

Depends on: core (theme + icons)

## Variants

### Totals

```tsx
<View style={{ gap: 8 }}>
  <KeyValueRow label="Subtotal" value="$300.00" />
  <KeyValueRow label="Tax" value="$40.00" />
  <KeyValueRow label="Total" value="$340.00" labelStyle={{ fontWeight: '700' }} valueStyle={{ fontWeight: '700' }} />
</View>
```

### Numeric value

```tsx
<KeyValueRow label="Items" value={12} />
```

### Custom node

```tsx
<KeyValueRow label="Status" value={<Badge label="PAID" variant="success" />} />
```

## Full demo source

```tsx
const variants: VariantDef[] = [
  {
    label: 'Totals',
    content: (
      <View style={{ gap: 8 }}>
        <KeyValueRow label="Subtotal" value="$300.00" />
        <KeyValueRow label="Tax" value="$40.00" />
        <KeyValueRow label="Total" value="$340.00" labelStyle={{ fontWeight: '700' }} valueStyle={{ fontWeight: '700' }} />
      </View>
    ),
  },
  { label: 'Numeric value', content: <KeyValueRow label="Items" value={12} /> },
  { label: 'Custom node', content: <KeyValueRow label="Status" value={<Badge label="PAID" variant="success" />} /> },
];
return <VariantList variants={variants} />;
```

## Props

| Name | Type | Default | Description |
|---|---|---|---|
| `label` | `ReactNode` | — | — |
| `value` | `ReactNode` | — | — |
| `style?` | `StyleProp<ViewStyle>` | — | — |
| `labelStyle?` | `StyleProp<TextStyle>` | — | — |
| `valueStyle?` | `StyleProp<TextStyle>` | — | — |
