@mtdt/observeops-ds-elements
v0.1.26
Published
ObserveOps design system as framework-agnostic Web Components (obs-*). The real DS components for React/Vue/HTML.
Maintainers
Readme
@mtdt/observeops-ds-elements
The real ObserveOps design-system components as framework-agnostic Web Components (obs-* custom
elements). Use them in React, Vue, Svelte, Angular, or plain HTML — the output is the actual DS component, not a
reconstruction, so it looks and behaves like the product.
This is the build target the AI Operating Contract points at: use these components, don't reconstruct them.
Install
npm install @mtdt/observeops-ds-elements @mtdt/observeops-ds-cssImport once to register every obs-* element (registration runs on import), and load the token CSS so colours
theme correctly:
import '@mtdt/observeops-ds-elements' // registers obs-button, obs-tag, …
import '@mtdt/observeops-ds-css/dist/observeops-ds.css' // the DS tokens (light + dark)Then use them anywhere:
<obs-button variant="primary">Save</obs-button>
<obs-input type="search" placeholder="Search…"></obs-input>
<obs-tag variant="tag-green">Active</obs-tag>
<obs-severity severity="critical" display-text></obs-severity>
<obs-radio as-button options="Low,Medium,High" value="Medium"></obs-radio>
<obs-switch checked></obs-switch>Dark theme: set data-theme="dark-theme" on <html> (every token is theme-aware).
The components (obs-*)
obs-button · obs-input · obs-select · obs-switch · obs-checkbox · obs-radio · obs-link · obs-tag ·
obs-severity · obs-tags · obs-tooltip · obs-date-time-picker · obs-filters · obs-selected-pills · plus
the obs-layout-* foundation elements.
Props/variants: every component's full API (props, variants, states, tokens, and the decision-grade usage
rules — which variant when) lives in the machine spec @mtdt/observeops-ds-spec, and via the MCP server
@mtdt/observeops-ds-mcp (get_component, search_components, …). Read the contract in
@mtdt/observeops-ds-spec/AGENTS.md before building.
Events
Vue-emitted events deliver the value in event.detail as an array — unwrap it:
el.addEventListener('change', e => { const value = Array.isArray(e.detail) ? e.detail[0] : e.detail })Verify your render
Check that what you built matches the DS (tokens · components · variants · layout) with the shipped conformance
checker: node node_modules/@mtdt/observeops-ds-spec/conformance/ds-conformance.mjs <your-page.html> (aim ≥ 90).
