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

# ClassificationEditor

Presents category, tags and classification mode controls.

Generated from @oods/foundry 0.10.2

- Categories

  core

- Contexts

  form

- Readiness

  `proven-in-generated-apps`

## Playground

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

Documented example `classification-editor-presentational-controls` : mount, labelled native inputs retain their values; mode selection is flexible; submit does not navigate or save.

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

The real ClassificationEditor, live

React

Vue

## Code

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

**React**

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

const tags = [
  "alpha",
  "beta"
];

export function Example() {
  return (
    <ClassificationEditor
      title="Product classification"
      category="Electronics"
      tags={tags}
      mode="flexible"
    />
  );
}
```

## 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 | `Product classification` |
| `label` | `string \| undefined` | no | |
| `heading` | `string \| undefined` | no | |
| `name` | `string \| undefined` | no | |
| `description` | `string \| undefined` | no | |
| `subtitle` | `string \| undefined` | no | |
| `hint` | `string \| undefined` | no | |
| `category` | `string \| undefined` | no | `Electronics` |
| `primaryCategory` | `string \| undefined` | no | |
| `tags` | `string \| readonly unknown[] \| undefined` | no | `["alpha","beta"]` |
| `modes` | `readonly unknown[] \| undefined` | no | |
| `mode` | `string \| undefined` | no | `flexible` |
| `classificationMode` | `string \| undefined` | no | |

### Slots

default

### Events

none

## States

populated, empty

## Accessibility

- Role

  `textbox`

- How it gets its name

  `label` on `input[name="category"]`

### Keyboard

Keyboard

| Key | What it does |
| - | - |
| `Tab` | Move focus to the named native control |
| `x` | Edit the named control |

### Obligations in the contract

- labelled native inputs retain their values
- mode selection is flexible
- submit does not navigate or save

Mirrors renderClassificationEditor: form header aliases, Category input from category/primaryCategory, serialized Tags input and Mode select from modes or strict/flexible, with mode/classificationMode selection. Children replace the generated controls. modeParameter, tagPolicyParameter and maxTagsParameter are consumed unbound. The generic field binds the visible description subtitle without an invented onChange. Presentational native controls only: submit is prevented; no classification change, persistence or save event is promised.

## Tokens

The token roles this component reads.

- `form.background`
- `form.border`
- `form.text`
- `form.hint`

## 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 | verified | verified |
| visual themes | verified | verified |

## 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": "<YourClassificationEditor>",
  "oodsTraits": [
    "Classifiable"
  ],
  "substitution": {
    "component": "ClassificationEditor",
    "react": {
      "package": "<your-package>/react",
      "version": "<exact version>",
      "export": "<YourClassificationEditor>"
    },
    "vue": {
      "package": "<your-package>/vue",
      "version": "<exact version>",
      "export": "<YourClassificationEditor>"
    }
  }
}
```

## 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/classification-editor/manifest.json).

- **Contract**: `@oods/component-contracts@0.10.2 componentContracts.ClassificationEditor` `sha256:74d75e3e0a99…`
- **Documented example**: `@oods/component-contracts@0.10.2 sharedScenarios classification-editor-presentational-controls` `sha256:84450dfe120d…`
- **Catalog entry (catalog_list)**: `generated/0.10.2/system/catalog.json ClassificationEditor` `sha256:5bcbc6d24dca…`
- **React readiness**: `@oods/components-react@0.10.2 readiness ClassificationEditor` `sha256:add970fb13c0…`
- **Vue readiness**: `@oods/components-vue@0.10.2 readiness ClassificationEditor` `sha256:080313c91569…`
- **Prop types**: `generated/0.10.2/components/prop-types.json ClassificationEditor` `sha256:85c3b0ccff11…`
