Getting started
Document your library with Workbench
Generate component pages, API tables, and live previews for any custom-element library, from its Custom Elements Manifest.
Analyze the library
The analyzer reads your TypeScript sources without running them and writes custom-elements.json and the richer oddkin.metadata.json. Anything it cannot read statically is reported with its location, never guessed.
npx oddkin analyze tsconfig.jsonServe the Workbench
npx oddkin workbench dev --config oddkin.config.tsEach component page combines the API, examples, and an isolated preview. A library that publishes only a standard Custom Elements Manifest gets the same pages, with the enrichment it does not supply labelled as missing.
Add examples
Colocated *.examples.ts files declare named examples, typed from the element’s own properties; the Workbench shows them and tests can mount them.
import { defineExamples } from '@oddkin/workbench/examples';
export default defineExamples('demo-greeting', {
default: { label: 'Default', props: { name: 'Ada' } },
excited: { label: 'Excited', props: { name: 'Ada', excited: true } },
});