Get a component contract
get_componentRetrieve a component’s full contract—import, props, variants, tokens, parts, and docs—before using it so UI matches the design system. Use the component name or file path in a monorepo.
Instructions
Get the full contract of one component: import, props with types and defaults, cva variants and the classes each applies, parts (sub-components), design tokens it uses, usage guidelines and examples from its docs. Call it before using a component. Accepts "Button", "CardHeader" or "Card.Header". At a monorepo root, pass path (the file you are editing) to get the component its project uses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component name, e.g. "Button" or "CardHeader". | |
| path | No | In a monorepo served from its root: the file you are editing, or a project folder, relative to the root, to answer from that project. Without it, every project is listed together. Ignored in a single project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docs | No | ||
| name | Yes | How the component is written in JSX: Button, CardHeader, Tabs.List. | |
| props | Yes | ||
| import | Yes | The import statement to use. | |
| parent | No | ||
| source | Yes | ||
| tokens | Yes | Names of the design tokens its classes use. | |
| aliases | Yes | ||
| cssVars | Yes | ||
| element | No | The native element it renders or wraps. | |
| package | No | At a workspace root: the package its source belongs to, e.g. "@acme/ui". | |
| examples | Yes | ||
| inherits | Yes | ||
| projects | No | At a workspace root: the folders of the projects that use it. | |
| variants | Yes | ||
| openProps | Yes | Part of the props type did not resolve; extra props may be accepted. | |
| classNames | Yes | ||
| deprecated | No | ||
| exportName | Yes | ||
| importPath | Yes | ||
| description | No | ||
| subcomponents | Yes | ||
| compoundVariants | Yes |