Components / core
ClassificationEditor
Presents category, tags and classification mode controls.
Generated from @oods/foundry 0.19.0
- 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.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
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.
| 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 |
primary | string | undefined | no | |
tags | string | readonly unknown[] | undefined | no | ["alpha","beta"] |
modes | readonly unknown[] | undefined | no | |
mode | string | undefined | no | flexible |
classification | string | undefined | no |
Slots
default
Events
none
States
populated, empty
Accessibility
- Role
textbox- How it gets its name
labeloninput[name="category"]
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.backgroundform.borderform.textform.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 a build of 0.19.0's source before it was published, not on the published package.
| 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.
- Contract:
@oods/component-contracts@0.19.0 componentContracts.ClassificationEditorsha256:74d75e3e0a99… - Documented example:
@oods/component-contracts@0.19.0 sharedScenarios classification-editor-presentational-controlssha256:84450dfe120d… - Catalog entry (catalog_list):
generated/0.19.0/system/catalog.json ClassificationEditorsha256:9304c9180f4e… - React readiness:
@oods/components-react@0.19.0 readiness ClassificationEditorsha256:add970fb13c0… - Vue readiness:
@oods/components-vue@0.19.0 readiness ClassificationEditorsha256:080313c91569… - Prop types:
generated/0.19.0/components/prop-types.json ClassificationEditorsha256:85c3b0ccff11…