❤️ Support our project - Your donation helps us continue developing awesome tools!


Docs
CLI

CLI

Use the CLI to add components to your project.

init

Use the init command to initialize configuration and dependencies for a new project.

The init command installs dependencies, adds the ny util, configures tailwind.config.js, and CSS variables for the project.

npx nyxb@latest init

You will be asked a few questions to configure nyxbui.json:

Which style would you like to use? › Miami
Which color would you like to use as base color? › Zinc
Do you want to use CSS variables for colors? › no / yes

Options

Usage: nyxb init [options] [components...]
 
initialize your project and install dependencies
 
Arguments:
  components         the components to add or a url to the component.
 
Options:
  -d, --defaults    use default values i.e miami, zinc and css variables. (default: false)
  -f, --force       force overwrite of existing nyxbui.json. (default: false)
  -y, --yes         skip confirmation prompt. (default: false)
  -c, --cwd <cwd>   the working directory. defaults to the current directory.
  -h, --help       display help for command

add

Use the add command to add components and dependencies to your project.

npx nyxb@latest add [component]

You will be presented with a list of components to choose from:

Which components would you like to add? › Space to select. A to toggle all.
Enter to submit.
 
◯  accordion
◯  alert
◯  alert-dialog
◯  aspect-ratio
◯  avatar
◯  badge
◯  button
◯  calendar
◯  card
◯  checkbox

Options

Usage: nyxb add [options] [components...]
 
add a component to your project
 
Arguments:
  components         the components to add or a url to the component.
 
Options:
  -y, --yes          skip confirmation prompt. (default: false)
  -o, --overwrite    overwrite existing files. (default: false)
  -c, --cwd <cwd>    the working directory. defaults to the current directory.
  -p, --path <path>  the path to add the component to.
  -h, --help         display help for command

Monorepo

In a monorepo, you can specify the path to your workspace with the -c or --cwd option.

npx nyxb@latest init -c ./apps/www

or

npx nyxb@latest add alert-dialog -c ./apps/www