Skip to main content

Configuration

Every yummaui command, flag & config field.

View as Markdown

Set Up a Project

Detects your framework, package manager & import alias before asking where components live.

pnpm dlx yummaui init
Option
--forceReplace an existing yummaui.json
-y, --yesSkip prompts & take the defaults

Add Components

Copies one or more components in. With no names, it opens a list to search & pick from.

pnpm dlx yummaui add button
pnpm dlx yummaui add dialog tooltip
pnpm dlx yummaui add
pnpm dlx yummaui add --all
pnpm dlx yummaui add button --style compact --radius small
Option
-a, --allAdd every component
--style <name>soft, compact or squircle
--radius <step>none, small, medium, large or extra
--overwriteReplace files that already exist
-y, --yesSkip prompts & take the defaults

It asks before installing what a component needs from npm, and offers the same Yumma CSS setup as init when it is missing.

List Components

pnpm dlx yummaui list

Prints every component.

Remove Unused Components

Finds component files nothing in your project reaches.

pnpm dlx yummaui prune
pnpm dlx yummaui prune --write
Option
--writeDelete, instead of only listing
-y, --yesSkip the confirmation

Only files add wrote are ever candidates. Your own components in the same folder are never touched.

A file counts as used only when something outside your components folder reaches it.

Configuration File

yummaui.json
{
  "componentsDir": "src/components/ui",
  "alias": "@/components/ui",
  "registry": "https://yummacss.com/ui/registry"
}
FieldMeaning
componentsDirWhere components are written, relative to the project root
aliasThe import prefix for that directory, or null to use relative imports
registryWhere components are fetched from
styleThe style add uses when --style is not given
radiusThe radius add uses when --radius is not given

Registry

The registry is static JSON published by this site.

https://yummacss.com/ui/registry/index.json                     every component, and the theme they animate with
https://yummacss.com/ui/registry/<id>.json                      one component's source and dependencies
https://yummacss.com/ui/registry/styles.json                    the styles and the radius steps each takes
https://yummacss.com/ui/registry/<style>-<radius>/<id>.json     the same, rewritten for a style

Point registry at your own copy to serve components from somewhere else.