CLI

CLI Reference

The colorsnap-ui CLI copies components directly into your project. You own the code.

npm install -g colorsnap-ui # or run without installing globally: npx colorsnap-ui [command]
colorsnap-ui init Start here

Set up ColorSnap UI in your project. Creates the components directory, ThemeProvider, and cn() utility.

npx colorsnap-ui init
colorsnap-ui add <component> Copy component

Copy any component into your project. You own the code.

npx colorsnap-ui add button npx colorsnap-ui add card modal tabs npx colorsnap-ui add --dir ./src/components button
FlagDescriptionDefault
--dir, -dTarget directory for copied files./components/ui

Available components:

button card input modal tabs dropdown toast sidebar badge avatar table accordion slider progress
colorsnap-ui theme <name> Switch theme

Apply a theme to your project configuration.

npx colorsnap-ui theme midnight npx colorsnap-ui theme ocean npx colorsnap-ui theme cyberpunk
colorsnap-ui cdn Get CDN code

Print the CDN embed snippet for a chosen theme.

npx colorsnap-ui cdn npx colorsnap-ui cdn --theme ocean
FlagDescriptionDefault
--theme, -tTheme name for the embedmidnight
colorsnap-ui add-form <form> Pre-built forms

Copy a pre-built form into your project.

npx colorsnap-ui add-form contact npx colorsnap-ui add-form login npx colorsnap-ui add-form checkout

Available: contact, login, register, checkout, survey, feedback, search, newsletter, profile, password-reset, booking

colorsnap-ui list Browse available

List all components and forms available to add.

npx colorsnap-ui list
colorsnap-ui themes Browse themes

Browse all 52 themes with mood tags.

npx colorsnap-ui themes