DesignComponent design.component@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- design
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/design/component.v1.json
design.component@1: a platform-neutral OpenVibe interface definition served by openvibe.design/api/v1/components.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
schema | const | yes |
| |
name | string | yes |
| |
title | string | yes |
| |
summary | string | yes |
| |
anatomy | array of object | yes |
| |
anatomy[].part | string | yes |
| |
anatomy[].role | string | yes |
| |
props | object | yes | ||
states | array of string | yes |
| |
tokens | array of string | yes |
| |
behaviors | object | yes |
| |
behaviors.keyboardAware | boolean | yes | ||
behaviors.outsideTapCloses | boolean | yes | ||
behaviors.scrollLock | boolean | yes | ||
behaviors.reducedMotion | string | yes |
| |
accessibility | object | yes |
| |
accessibility.name | string | yes |
| |
accessibility.target | string | yes |
| |
accessibility.focus | string | yes |
| |
platforms | object | yes |
| |
platforms.web | object | yes |
| |
platforms.web.module | string | yes |
| |
platforms.web.markup | string | yes |
| |
platforms.web.demo | string | yes |
| |
platforms.android | object | yes |
| |
platforms.android.toolkit | const | yes |
| |
platforms.android.material3 | string | yes |
| |
platforms.android.specification | string | yes |
| |
platforms.ios | object | yes |
| |
platforms.ios.toolkit | const | yes |
| |
platforms.ios.specification | string | yes |
| |
examples | array of object | yes |
| |
examples[].title | string | yes |
| |
examples[].props | object | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: sheet
{
"schema": "design.component@1",
"name": "sheet",
"title": "Sheet",
"summary": "A modal task surface: one heading, one close action and scrollable content.",
"anatomy": [
{
"part": "handle",
"role": "touch affordance"
},
{
"part": "header",
"role": "title and close"
},
{
"part": "body",
"role": "task controls"
}
],
"props": {
"title": "string",
"open": "boolean",
"body": "content"
},
"states": [
"closed",
"opening",
"open",
"closing"
],
"tokens": [
"color.bg.card",
"color.line.strong",
"radius.lg"
],
"behaviors": {
"keyboardAware": true,
"outsideTapCloses": true,
"scrollLock": true,
"reducedMotion": "Remove movement; keep the state change."
},
"accessibility": {
"name": "Sheet",
"target": "At least 44 × 44 dp or pt for every touch action",
"focus": "Trap focus while open; Escape closes and returns focus"
},
"platforms": {
"web": {
"module": "openvibe-shared/kit",
"markup": "kit.sheet({ id, title, body })",
"demo": "/components/sheet"
},
"android": {
"toolkit": "Jetpack Compose",
"material3": "SurfaceContainerHigh",
"specification": "Use ModalBottomSheet with a heading, close control and sheet state."
},
"ios": {
"toolkit": "SwiftUI",
"specification": "Use .sheet with a NavigationStack and a toolbar close button."
}
},
"examples": [
{
"title": "Default",
"props": {
"title": "Add a site"
}
}
]
}Rejected: no-android
{
"schema": "design.component@1",
"name": "sheet",
"title": "Sheet",
"summary": "A modal task surface: one heading, one close action and scrollable content.",
"anatomy": [
{
"part": "handle",
"role": "touch affordance"
},
{
"part": "header",
"role": "title and close"
},
{
"part": "body",
"role": "task controls"
}
],
"props": {
"title": "string",
"open": "boolean",
"body": "content"
},
"states": [
"closed",
"opening",
"open",
"closing"
],
"tokens": [
"color.bg.card",
"color.line.strong",
"radius.lg"
],
"behaviors": {
"keyboardAware": true,
"outsideTapCloses": true,
"scrollLock": true,
"reducedMotion": "Remove movement; keep the state change."
},
"accessibility": {
"name": "Sheet",
"target": "At least 44 × 44 dp or pt for every touch action",
"focus": "Trap focus while open; Escape closes and returns focus"
},
"platforms": {
"web": {
"module": "openvibe-shared/kit",
"markup": "kit.sheet({ id, title, body })",
"demo": "/components/sheet"
},
"ios": {
"toolkit": "SwiftUI",
"specification": "Use .sheet with a NavigationStack and a toolbar close button."
}
},
"examples": [
{
"title": "Default",
"props": {
"title": "Add a site"
}
}
]
}Rejected: no-ios
{
"schema": "design.component@1",
"name": "sheet",
"title": "Sheet",
"summary": "A modal task surface: one heading, one close action and scrollable content.",
"anatomy": [
{
"part": "handle",
"role": "touch affordance"
},
{
"part": "header",
"role": "title and close"
},
{
"part": "body",
"role": "task controls"
}
],
"props": {
"title": "string",
"open": "boolean",
"body": "content"
},
"states": [
"closed",
"opening",
"open",
"closing"
],
"tokens": [
"color.bg.card",
"color.line.strong",
"radius.lg"
],
"behaviors": {
"keyboardAware": true,
"outsideTapCloses": true,
"scrollLock": true,
"reducedMotion": "Remove movement; keep the state change."
},
"accessibility": {
"name": "Sheet",
"target": "At least 44 × 44 dp or pt for every touch action",
"focus": "Trap focus while open; Escape closes and returns focus"
},
"platforms": {
"web": {
"module": "openvibe-shared/kit",
"markup": "kit.sheet({ id, title, body })",
"demo": "/components/sheet"
},
"android": {
"toolkit": "Jetpack Compose",
"material3": "SurfaceContainerHigh",
"specification": "Use ModalBottomSheet with a heading, close control and sheet state."
}
},
"examples": [
{
"title": "Default",
"props": {
"title": "Add a site"
}
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('design.component@1', value); // { valid, errors: [{ path, message }] }