AsterUIDocsv1.0.2

Docs / Guides

Own and update a component

Button example

The registry installer copies TSX, component styles and dependency files into your project. Import the local module, commit it with the feature that uses it, and review future upstream changes alongside your edits.

Install a button and its dependencies

sh
npx @fierst/ui@1.0.2 add button --dir src/ui

The button manifest lists two registry dependencies, theme and icon, plus the npm package @lucide/icons. Open its files array to see the button source and target path. The installer copies the local helpers, then prints the npm command for the package dependency. Keep the copied files together so the button’s relative imports resolve.

Choose what to edit

Use a public prop for a choice the component already models, such as a button variant. Use theme tokens for a decision shared by many components, such as control radius. Edit the owned TSX when the markup or interaction itself needs to change. In Code + CSS, compare the button’s use in the example with the site-owned component source. In the latter, find the CSS selector for the primary variant. Inspect Button and ButtonGroup.

Review an update

To compare your copy against this release, run npx @fierst/ui@1.0.2 add button --dir src/ui-review from the project root. Compare src/ui-review with src/ui, including theme.css and shared helpers. For a future release, substitute that release’s version in the command. Merge the changes you want, then exercise focus, keyboard activation and any modified event callbacks. The --force option replaces matching files, so a clean diff is particularly valuable.