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

# PreferencePanel

Groups preference details and authored content.

Generated from @oods/foundry 0.10.1

- Categories

  core

- 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 `preference-panel-title-and-summary` : mount without authored children, h2 heading from the label alias, visible metadata subtitle and the empty message inside the content area.

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

The real PreferencePanel, live

React

## Preferences

Namespace: notifications

No preferences saved

Vue

## Preferences

Namespace: notifications

No preferences saved

## Code

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

**React**

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

export function Example() {
  return (
    <PreferencePanel
      label="Preferences"
      metadata="Namespace: notifications"
      emptyMessage="No preferences saved"
    />
  );
}
```

## 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 | |
| `label` | `string \| undefined` | no | `Preferences` |
| `heading` | `string \| undefined` | no | |
| `name` | `string \| undefined` | no | |
| `subtitle` | `string \| undefined` | no | |
| `description` | `string \| undefined` | no | |
| `metadata` | `string \| undefined` | no | `Namespace: notifications` |
| `summary` | `string \| undefined` | no | |
| `text` | `string \| undefined` | no | |
| `body` | `string \| undefined` | no | |
| `emptyMessage` | `string \| undefined` | no | `No preferences saved` |

### Slots

default

### Events

none

## States

summary, content

## 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 h3 heading names the panel section
- Subtitle and summary text remain visible beside the heading
- The panel is noninteractive

Mirrors renderPreferencePanel over renderPanelSection with data-panel-type=preference: title aliases title/label/heading/name (default Preferences), subtitle aliases subtitle/description/metadata, and summary/text/body/emptyMessage fill the content area only without authored children. The saved-schema directives preferencesField, metadataField and namespaceField are consumed by codegen and left unbound: the HTML renderer reads no preference document or namespaces, and its metadata alias is scalar subtitle text while metadataField names the object-typed preference_metadata field.

## Tokens

The token roles this component reads.

- `panel.background`
- `panel.border`
- `panel.title`
- `panel.subtitle`

## 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 |

PreferencePanel 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": "<YourPreferencePanel>",
  "oodsTraits": [
    "Preferenceable"
  ],
  "substitution": {
    "component": "PreferencePanel",
    "react": {
      "package": "<your-package>/react",
      "version": "<exact version>",
      "export": "<YourPreferencePanel>"
    },
    "vue": {
      "package": "<your-package>/vue",
      "version": "<exact version>",
      "export": "<YourPreferencePanel>"
    }
  }
}
```

## 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/preference-panel/manifest.json).

- **Contract**: `@oods/component-contracts@0.10.1 componentContracts.PreferencePanel` `sha256:49bc6ac846d5…`
- **Documented example**: `@oods/component-contracts@0.10.1 sharedScenarios preference-panel-title-and-summary` `sha256:645aad785804…`
- **Catalog entry (catalog_list)**: `generated/0.10.1/system/catalog.json PreferencePanel` `sha256:74b150ae4c14…`
- **React readiness**: `@oods/components-react@0.10.1 readiness PreferencePanel` `sha256:220e891db14d…`
- **Vue readiness**: `@oods/components-vue@0.10.1 readiness PreferencePanel` `sha256:5473892e93fa…`
- **Prop types**: `generated/0.10.1/components/prop-types.json PreferencePanel` `sha256:57585e3e734e…`
