Install Fasla Pro
Fasla Pro blocks install into your shadcn/ui project with one command. They are built with Fasla’s free components, which are added to your project automatically.
Requirements
Built with React, TypeScript, Tailwind CSS 4 and shadcn/ui. Tested in Next.js 16 and Vite. shadcn 3.0 or newer is required.
- A Fasla Pro or Team plan and your registry token. Create the token on the License page of your dashboard; it is shown once. Each person on a Team creates their own.
- Components with the same name as yours (such as Button) are replaced by Fasla’s versions. Commit your changes first.
- An internet connection is needed to install.
New project
The first step sets Fasla up, so nothing needs replacing. In a terminal, init asks four questions: where components go, where your utils file is, which shadcn style to use, and how your components should look (Fasla’s colours or your own). If a components.json already exists, it asks before overwriting it.
1. Set up Fasla (once). It writes components.json, the theme and the helpers.
npx @smicolon/fasla-ui@latest initWithout a terminal (CI or an agent shell) init cannot ask, so it exits with an error and writes nothing unless you pass --yes, or all of --path, --style and --theme. This accepts the defaults and uses Fasla’s colours (use --theme brand to keep your own):
npx @smicolon/fasla-ui@latest init --yes --theme fasla2. Add the Pro registry to components.json, next to the other entries in "registries". Do this after the first step: init rewrites components.json.
"@fasla-pro": {
"url": "https://fasla-pro.smicolon.com/r/{name}.json",
"headers": {
"Authorization": "Bearer ${FASLA_PRO_TOKEN}"
}
}3. Add your registry token to .env.local and keep that file out of git.
FASLA_PRO_TOKEN=fpro_…4. Install a block.
npx shadcn@latest add @fasla-pro/hero-editorial-archExisting shadcn/ui project
Do not run Fasla’s init: it rewrites components.json and removes the registries you have.
1. Commit your changes. Git is your backup: installing a block can replace files you edited.
git add -A && git commit -m "Before Fasla Pro"2. Add the Fasla theme (once). It adds the colour tokens (soft, success, warning, info) and the Cairo font. Your brand colours stay.
npx shadcn@latest add https://fasla.smicolon.com/r/theme-base.jsonNext.js 16: in a project set up with shadcn init, English text can show in a serif font after this step. That command writes --font-sans: var(--font-sans); in app/globals.css. Change the line to --font-sans: var(--font-geist-sans);, then restart the dev server. Fasla’s init writes the right line itself.
3. Add the Pro registry entry to components.json and the token to .env.local, exactly as in steps 2 and 3 of the new project.
4. Install a block. If shadcn asks to replace files such as button.tsx, answer yes: these are the Fasla versions the blocks need.
npx shadcn@latest add @fasla-pro/hero-editorial-archInstall in CI
In CI always use --yes --overwrite. Without --overwrite, shadcn can stop halfway after writing one file and still exit with success, so a build can be green with a block missing. The flag replaces files that have the same name.
npx shadcn@latest add @fasla-pro/hero-editorial-arch --yes --overwriteNotes
- Answering no to the overwrite question for
button.tsxbreaks the project: Pro blocks use Fasla’s Button. - If your project uses Base UI and your code calls Button with
renderornativeButton, change those calls toasChild. - Running
addagain for a block asks before it replaces files. If you answer yes, edits you made to those files are lost, so commit first. - Use https only. If a token was ever sent over http, rotate it on the License page.
- With no internet the install stops with a clear message and writes no files.
If something goes wrong
| Message | What it means | What to do |
|---|---|---|
requires the following environment variables: FASLA_PRO_TOKEN | shadcn found no token | Add FASLA_PRO_TOKEN to .env.local, or export it in your terminal |
missing_token (401) | The request had no token | Check the Authorization header in components.json |
invalid_token (401) | The token is wrong or was revoked | Copy it again from the License page, or rotate it |
https_required (400) | The request used http | Use the https address; rotate the token if it went over http |
inactive (403) | The license is not active: it was refunded, or you were removed from the team | See Billing in your dashboard, or write to support@smicolon.com |
not_found (404) | The registry has no block with that name | Check the spelling of the block name in your command |
rate_limited (429) | Too many requests | Wait a minute, then run the command again |
unavailable (503) | The registry is unavailable right now | Try again later |
Known limits
- A monorepo where the components live in a shared package is not supported yet.