tailui generate
Generate a typed, accessible framework component using AI. The AI reads your existing CSS styles and outputs a component that uses your .ui-* classes.
# Generate a button component for your configured stacknpx tailui generate button# Override stack for a single generationnpx tailui generate card --stack vue| Option | Description |
|---|---|
-s, --stack | Override the framework for this generation (react, vue, svelte, angular) |
How it works:
- Reads your
ui.{component}.cssfile - Sends the CSS + your config to the AI provider
- AI generates a typed component with props for all variants
- Saves to your
componentsDir
Requires: AI configured via tailui init or tailui config --set-ai