tailui add

Add a pre-built TailUI component to your project. This copies the CSS styles and generates a typed framework component (React, Vue, Svelte, or Angular) based on your configuration.

# Add a button component (CSS + React/Vue/Svelte component)
npx tailui add button
# Add a card component
npx tailui add card
# Add only the CSS file (no framework component)
npx tailui add modal --css-only
# Overwrite existing files
npx tailui add button --overwrite

What happens when you run this command:

  1. The CSS file (e.g. ui.button.css) is copied to your stylesDir
  2. The index.css is updated to import the new component styles

The generated component uses TailUI .ui-* classes and exposes typed props for variants, sizes, and states. You own the code — customize it as needed.