Navigated to /docs/ui/api/metadata

Component metadata API

Machine-readable component guidance, composition metadata, examples, intent matching, and lookup helpers.

Component metadata exports

13 public exports from @tavojs/ui/metadata.

@tavojs/ui/metadata

Canonical import boundary for every symbol in this section.

AgentComponentGuide#

type AgentComponentGuide = {
    component: string;
    importPath: string;
    cssImportPath: string;
    summary: string;
    whenToUse: string;
    avoidWhen: string;
    props: ComponentPropMetadata[];
    examples: ComponentExample[];
    accessibility: ComponentAccessibilityGuidance;
    related: string[];
};

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentAccessibilityGuidance#

type ComponentAccessibilityGuidance = {
    summary: string;
    checklist: string[];
};

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentCategory#

type ComponentCategory = "layout" | "forms" | "data" | "feedback" | "content" | "recipes" | "navigation";

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentCompositionMetadata#

type ComponentCompositionMetadata = {
    related?: string[];
    compoundMembers?: string[];
    commonPairings?: string[];
};

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentExample#

type ComponentExample = {
    title: string;
    code: string;
};

Public type exported from @tavojs/ui/metadata.

Related guide

componentMetadata#

componentMetadata: ComponentMetadata[]

Public value exported from @tavojs/ui/metadata.

Related guide

ComponentMetadata#

type ComponentMetadata = {
    name: string;
    slug: string;
    category: ComponentCategory;
    importPath: string;
    cssImportPath: string;
    description: string;
    status: ComponentStatus;
    summary: string;
    whenToUse: string;
    avoidWhen: string;
    props: ComponentPropMetadata[];
    examples: ComponentExample[];
    composition: ComponentCompositionMetadata;
    related?: string[];
    accessibility?: string;
    accessibilityGuidance: ComponentAccessibilityGuidance;
    searchTerms: string[];
};

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentPropMetadata#

type ComponentPropMetadata = {
    name: string;
    type: string;
    required?: boolean;
    defaultValue?: string;
    description: string;
};

Public type exported from @tavojs/ui/metadata.

Related guide

ComponentStatus#

type ComponentStatus = "stable" | "experimental";

Public type exported from @tavojs/ui/metadata.

Related guide

findComponentsForIntent#

findComponentsForIntent(query: string): ComponentMetadata[]

Public function exported from @tavojs/ui/metadata.

Related guide

getAgentComponentGuide#

getAgentComponentGuide(name: string): AgentComponentGuide | undefined

Public function exported from @tavojs/ui/metadata.

Related guide

getComponentMetadata#

getComponentMetadata(name: string): ComponentMetadata | undefined

Public function exported from @tavojs/ui/metadata.

Related guide

getComponentsByCategory#

getComponentsByCategory(category: ComponentCategory): ComponentMetadata[]

Public function exported from @tavojs/ui/metadata.

Related guide