API Reference
apps/docs/src/content/docs/api-reference/overview Click to copy apps/docs/src/content/docs/api-reference/overview The HELiX component API reference is rendered from the Custom Elements Manifest (CEM). The CEM is the single source of truth — every component page in Storybook reads from it.
Custom Elements Manifest
Section titled “Custom Elements Manifest”The CEM is generated from JSDoc comments in component source code by @custom-elements-manifest/analyzer. The analyzer reads packages/hx-library/src/components/**/*.ts and emits packages/hx-library/custom-elements.json. Whenever a component’s JSDoc, decorators, or events change, regenerate the CEM:
pnpm cemPer Phase D of the docs cleanup epic, the canonical per-component reference is the live Storybook autodocs page; the previously-shipped Astro per-component pages were deleted to avoid duplicating the CEM.
What the reference includes per component
Section titled “What the reference includes per component”Drawn directly from the CEM declaration block:
| Section | CEM source field |
|---|---|
| Properties | members where kind: 'field' |
| Events | events |
| Slots | slots |
| CSS Parts | cssParts |
| CSS Custom Properties | cssProperties |
Public methods (members where kind: 'method') are documented in JSDoc but Storybook autodocs surfaces them via inline narrative rather than a dedicated table.
Example: hx-button (excerpt)
Section titled “Example: hx-button (excerpt)”hx-button=========
Properties (selected): variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' | 'outline' (default: 'primary') tone: 'neutral' | 'success' | 'warning' | 'danger' | 'info' (default: 'neutral') size: 'sm' | 'md' | 'lg' (default: 'md') loading: boolean (default: false) disabled: boolean (default: false) href: string (renders as <a> when set)
Events: hx-click: { originalEvent: PointerEvent | KeyboardEvent }
Slots: (default): Button label content prefix: Icon or content placed before the label suffix: Icon or content placed after the label
CSS Parts: base: The host-rendered interactive element (<button> or <a> depending on href) label: The wrapper around the default slot prefix, suffix: The named-slot wrappersThe full, current API for every component (44 P0 + ancillary) is rendered live in Storybook under each component’s “Docs” tab.
Regenerating + consuming
Section titled “Regenerating + consuming”# Regenerate CEM from source JSDoc annotationspnpm cemPipeline:
- JSDoc comments + decorators in
packages/hx-library/src/components/**/*.ts @custom-elements-manifest/analyzerproducespackages/hx-library/custom-elements.jsonscripts/generate-react-wrappers.tsemits framework wrappers (typed React props/events for@helixui/react)- Storybook autodocs reads the CEM directly via the addon-docs CEM integration
- The committed
packages/hx-library/aaa-verdicts.jsonsnapshot feeds the per-page<AAAConformanceCard>
Component Catalog
Section titled “Component Catalog”For the complete component list and live API documentation, see Storybook.