[Components](https://oods-foundry.com/components) / content

# DetailHeader

Names a record with a heading and optional supporting text.

Generated from @oods/foundry 0.10.1

- Categories

  content

- Contexts

  detail

- Readiness

  `proven-in-generated-apps`

## Playground

This component's contract doesn't list typed props, so the playground shows its documented example.

Documented example `detail-header-heading-level` : mount with as=h1 and level=2, as selects h1 with visible subtitle and metadata.

The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.

The real DetailHeader, live

React

# Subscription details

Pro plan Renews monthly

Vue

# Subscription details

Pro plan Renews monthly

## Code

The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.

**React**

```
import { DetailHeader } from '@oods/components-react';
import '@oods/component-styles/css';

export function Example() {
  return (
    <DetailHeader
      title="Subscription details"
      subtitle="Pro plan"
      metadata="Renews monthly"
      as="h1"
      level={2}
    />
  );
}
```

## Props, slots and events

Contract version 1.1.0. Types are from the React declarations in @oods/components-react.

Props

| Prop | Type | Required | Documented example |
| - | - | - | - |
| `title` | `string \| undefined` | no | `Subscription details` |
| `label` | `string \| undefined` | no | |
| `text` | `string \| undefined` | no | |
| `subtitle` | `string \| undefined` | no | `Pro plan` |
| `sublabel` | `string \| undefined` | no | |
| `description` | `string \| undefined` | no | |
| `metadata` | `string \| undefined` | no | `Renews monthly` |
| `meta` | `string \| undefined` | no | |
| `level` | `HeaderLevel \| undefined` | no | `2` |
| `as` | `HeaderElement \| undefined` | no | `h1` |

### Slots

default

### Events

none

## States

default

## Accessibility

- Role

  `none`

- How it gets its name

  `heading` on `h1,h2,h3,h4,h5,h6`

### Keyboard

The contract lists no keyboard behaviour.

### Obligations in the contract

- A real heading element follows as/level with default h2
- Subtitle and metadata remain visible beside the heading

Mirrors renderDetailHeader title/subtitle/metadata aliases and headingTag(level, 2); saved-schema as selects a heading element, and authored default-slot content is preserved. Saved-schema titleField and subtitleField lower to title and subtitle, and an integer headingLevel lowers to level; none of the three is a public prop.

## Tokens

The token roles this component reads.

- `header.title`
- `header.subtitle`
- `header.metadata`

## Readiness

The evidence recorded for this component, with its label.

`proven-in-generated-apps`: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.

Readiness evidence

| Evidence | React | Vue |
| - | - | - |
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | not-applicable | not-applicable |
| visual themes | verified | verified |

DetailHeader presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.

## Use your own

You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.

The `component_map` call, with the parts in angle brackets yours to fill:

```
{
  "action": "create",
  "apply": true,
  "externalSystem": "<your design system>",
  "externalComponent": "<YourDetailHeader>",
  "oodsTraits": [
    "Labelled"
  ],
  "substitution": {
    "component": "DetailHeader",
    "react": {
      "package": "<your-package>/react",
      "version": "<exact version>",
      "export": "<YourDetailHeader>"
    },
    "vue": {
      "package": "<your-package>/vue",
      "version": "<exact version>",
      "export": "<YourDetailHeader>"
    }
  }
}
```

## How this page was made

Generated at build from the published data, each source with the hash of what was read. [The page's manifest](https://oods-foundry.com/components/detail-header/manifest.json).

- **Contract**: `@oods/component-contracts@0.10.1 componentContracts.DetailHeader` `sha256:f967276ef807…`
- **Documented example**: `@oods/component-contracts@0.10.1 sharedScenarios detail-header-heading-level` `sha256:3a78911e98bc…`
- **Catalog entry (catalog_list)**: `generated/0.10.1/system/catalog.json DetailHeader` `sha256:06502e17d0d9…`
- **React readiness**: `@oods/components-react@0.10.1 readiness DetailHeader` `sha256:5f50f377f9ac…`
- **Vue readiness**: `@oods/components-vue@0.10.1 readiness DetailHeader` `sha256:24d0380451b6…`
- **Prop types**: `generated/0.10.1/components/prop-types.json DetailHeader` `sha256:69b7a6f75d9c…`
