Skip to content
GitHub11 stars

Configuration for your project.

The blazix.json file holds the configuration for your project.

The CLI uses it to know where to put components, which namespace to give them, and what you've installed.

init writes it, and add updates it. You can edit it by hand.

blazix.json
{
  "namespace": "MyApp.Components.UI",
  "componentsDir": "Components/UI",
  "version": "0.1.0",
  "rtl": false,
  "iconLibrary": "lucide",
  "installed": {
    "utils": "0.1.0",
    "button": "0.1.0"
  }
}

namespace

The namespace of your components. The registry's components are in Blazix.Registry, and add rewrites it to this one in every file it copies.

init makes it from your project's root namespace and the components folder.

blazix.json
{
  "namespace": "MyApp.Components.UI"
}

componentsDir

Where add puts components, relative to the project. Set it with init --dir. Defaults to Components/UI. Each component gets a folder of its own in it, such as Components/UI/Button, and every folder shares namespace.

blazix.json
{
  "componentsDir": "Components/UI"
}

version

The CLI version that set up the project. The components it copies are written against the Blazix.Primitives package of the same version.

rtl

Copy components right-to-left ready: add turns physical classes into logical ones (ml-2 into ms-2, left-0 into start-0) and flips directional icons under rtl:. Set it with init --rtl or migrate rtl. Defaults to false. See RTL.

blazix.json
{
  "rtl": true
}

iconLibrary

The icon set the components draw their icons from: lucide, tabler, hugeicons, phosphor, remixicon or fontawesome. add and init install its package, such as Blazix.Icons.Lucide. Set it with init --icon-library or migrate icons. Defaults to lucide. See Icons.

blazix.json
{
  "iconLibrary": "tabler"
}

installed

What you've added, with the version each came from. list marks these. To pick up a newer version of a component, run add <name> --overwrite and review the diff.

blazix.json
{
  "installed": {
    "utils": "0.1.0",
    "button": "0.1.0",
    "dropdown-menu": "0.1.0"
  }
}