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 guideComponentAccessibilityGuidance#
type ComponentAccessibilityGuidance = {
summary: string;
checklist: string[];
};Public type exported from @tavojs/ui/metadata.
Related guideComponentCategory#
type ComponentCategory = "layout" | "forms" | "data" | "feedback" | "content" | "recipes" | "navigation";Public type exported from @tavojs/ui/metadata.
Related guideComponentCompositionMetadata#
type ComponentCompositionMetadata = {
related?: string[];
compoundMembers?: string[];
commonPairings?: string[];
};Public type exported from @tavojs/ui/metadata.
Related guideComponentExample#
type ComponentExample = {
title: string;
code: string;
};Public type exported from @tavojs/ui/metadata.
Related guidecomponentMetadata#
componentMetadata: ComponentMetadata[]Public value exported from @tavojs/ui/metadata.
Related guideComponentMetadata#
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 guideComponentPropMetadata#
type ComponentPropMetadata = {
name: string;
type: string;
required?: boolean;
defaultValue?: string;
description: string;
};Public type exported from @tavojs/ui/metadata.
Related guideComponentStatus#
type ComponentStatus = "stable" | "experimental";Public type exported from @tavojs/ui/metadata.
Related guidefindComponentsForIntent#
findComponentsForIntent(query: string): ComponentMetadata[]Public function exported from @tavojs/ui/metadata.
Related guidegetAgentComponentGuide#
getAgentComponentGuide(name: string): AgentComponentGuide | undefinedPublic function exported from @tavojs/ui/metadata.
Related guidegetComponentMetadata#
getComponentMetadata(name: string): ComponentMetadata | undefinedPublic function exported from @tavojs/ui/metadata.
Related guidegetComponentsByCategory#
getComponentsByCategory(category: ComponentCategory): ComponentMetadata[]Public function exported from @tavojs/ui/metadata.
Related guide