> ## Documentation Index
> Fetch the complete documentation index at: https://design-system.rodrigoantunes.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Design Tokens

> You can use the design tokens as a **standalone approach** to ensure your components align seamlessly with the design principles of your project.

# Installation

<Note>
  Installing the design system also installs the design tokens automatically
</Note>

<Steps>
  <Step title="Install the package">
    You can also use **npm**, **yarn** or **pnpm**

    ```bash theme={null}
    npm install "@root-axis/design-tokens"
    ```
  </Step>

  <Step title="Import the package">
    Choose between the available formats

    <Tabs>
      <Tab title="CSS">
        ```css theme={null}
        @import "@root-axis/design-tokens"
        ```

        How to use it:
        <Note>CSS imports follow the kebab-case format</Note>

        ```css theme={null}
        button {
          color: var(--color-neutral-100);
          background: var(--color-neutral-900);
          padding-inline: var(--size-5);
          padding-block: var(--size-3);
          border-radius: var(--size-2);
          border: none;
        }
        ```
      </Tab>

      <Tab title="SCSS">
        ```scss theme={null}
        @use "@root-axis/design-tokens/scss/tokens.scss" as tokens;
        ```

        How to use it:
        <Note>SCSS imports follow the kebab-case format</Note>

        ```scss theme={null}
        button {
          color: tokens.$color-neutral-100;
          background: tokens.$color-neutral-900;
          padding-inline: tokens.$size-5;
          padding-block: tokens.$size-3;
          border-radius: tokens.$size-2;
          border: none;
        }
        ```
      </Tab>

      <Tab title="JS">
        <Note>JS imports follow the PascalCase format</Note>

        ```js theme={null}
        import {
          ColorNeutral100,
          ColorNeutral900,
          Size5,
          Size3,
          Size2,
        } from "@root-axis/design-tokens/js/tokens.js";
        ```

        How to use it:

        ```js theme={null}
        // Get the button element from the DOM
        const button = document.querySelector("button");

        // Apply styles dynamically to the button element
        // Assuming there is already a button in the DOM ⚠️
        button.style.color = ColorNeutral100;
        button.style.backgroundColor = ColorNeutral900;
        button.style.paddingInline = Size5;
        button.style.paddingBlock = Size3;
        button.style.borderRadius = Size2;
        button.style.border = "none";
        ```
      </Tab>

      <Tab title="TS">
        <Note>TS imports follow the PascalCase format</Note>

        ```ts theme={null}
        import {
          ColorNeutral100,
          ColorNeutral900,
          Size5,
          Size3,
          Size2,
        } from "@root-axis/design-tokens/ts/tokens";
        ```

        How to use it:

        ```js theme={null}
        // Get the button element from the DOM
        const button = document.querySelector("button") as HTMLButtonElement;

        // Apply styles dynamically to the button element
        // Assuming there is already a button in the DOM ⚠️
        button.style.color = ColorNeutral100;
        button.style.backgroundColor = ColorNeutral900;
        button.style.paddingInline = Size5;
        button.style.paddingBlock = Size3;
        button.style.borderRadius = Size2;
        button.style.border = "none";
        ```
      </Tab>

      <Tab title="JSON">
        ```js theme={null}
        import tokens from "@root-axis/design-tokens/json/tokens.json"
        ```

        How to use it:
        <Note>JSON imports follow the PascalCase format</Note>

        ```js theme={null}
        console.log(tokens.ColorNeutral100); // Output: #f5f5f5
        ```
      </Tab>

      <Tab title="TailwindCSS">
        <Tip>You can use this alongside TailwindCSS by importing it **before** the Tailwind directives</Tip>

        ```css globals.css theme={null}
        @import "@root-axis/design-tokens";
        @tailwind base;
        @tailwind components;
        @tailwind utilities;
        ```

        How to use it:
        <Note>CSS imports follow the kebab-case format</Note>

        ```css theme={null}
        button {
          color: var(--color-neutral-100);
          background: var(--color-neutral-900);
          padding-inline: var(--size-5);
          padding-block: var(--size-3);
          border-radius: var(--size-2);
          border: none;
        }
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

# Tokens

To keep things minimalistic, only three set of tokens are available:

* [Font Weight](#font-weight)
* [Size](#size)
* [Colors](#colors)

> "Less is more" *(Ludwig Mies van der Rohe)*

### Font Weight

Font-weight tokens to ensure consistent typography weights.

| Variable                        | Value |
| :------------------------------ | ----- |
| **var(--font-weight-thin)**     | 100   |
| **var(--font-weight-light)**    | 300   |
| **var(--font-weight-normal)**   | 400   |
| **var(--font-weight-medium)**   | 500   |
| **var(--font-weight-semibold)** | 600   |
| **var(--font-weight-bold)**     | 700   |

### Size

Define consistent sizes for typography, spacing, and other layout properties.

<Tip>
  You can use this approach to easily style various CSS properties, such as
  `font-size`, `gap`, `padding`, `margin`, `border-width`, `line-height`,
  `width`, `height`, and more
</Tip>

| Variable           | Value |
| :----------------- | ----- |
| **var(--size-0)**  | 0px   |
| **var(--size-1)**  | 1px   |
| **var(--size-2)**  | 4px   |
| **var(--size-3)**  | 8px   |
| **var(--size-4)**  | 12px  |
| **var(--size-5)**  | 16px  |
| **var(--size-6)**  | 20px  |
| **var(--size-7)**  | 24px  |
| **var(--size-8)**  | 32px  |
| **var(--size-9)**  | 40px  |
| **var(--size-10)** | 48px  |
| **var(--size-11)** | 64px  |
| **var(--size-12)** | 80px  |
| **var(--size-13)** | 96px  |

### Colors

A minimalistic color palette for your project.

<Note>
  You might notice this was **heavily inspired** by TailwindCSS... or, you know,
  borrowed 😎
</Note>

#### Neutral Colors

<div class="flex flex-wrap gap-6">
  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#fafafa" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-50)</p>
    <p class="m-0">#fafafa</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#f5f5f5" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-100)</p>
    <p class="m-0">#f5f5f5</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#e5e5e5" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-200)</p>
    <p class="m-0">#e5e5e5</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#d4d4d4" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-300)</p>
    <p class="m-0">#d4d4d4</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#a3a3a3" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-400)</p>
    <p class="m-0">#a3a3a3</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#737373" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-500)</p>
    <p class="m-0">#737373</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#525252" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-600)</p>
    <p class="m-0">#525252</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#404040" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-700)</p>
    <p class="m-0">#404040</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#262626" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-800)</p>
    <p class="m-0">#262626</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#171717" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-900)</p>
    <p class="m-0">#171717</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#0a0a0a" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-neutral-950)</p>
    <p class="m-0">#0a0a0a</p>
  </div>
</div>

#### Brand Colors

<div class="flex flex-wrap gap-6">
  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#eff6ff" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-50)</p>
    <p class="m-0">#eff6ff</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#dbeafe" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-100)</p>
    <p class="m-0">#dbeafe</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#bfdbfe" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-200)</p>
    <p class="m-0">#bfdbfe</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#93c5fd" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-300)</p>
    <p class="m-0">#93c5fd</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#60a5fa" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-400)</p>
    <p class="m-0">#60a5fa</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#3b82f6" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-500)</p>
    <p class="m-0">#3b82f6</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#2563eb" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-600)</p>
    <p class="m-0">#2563eb</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#1d4ed8" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-700)</p>
    <p class="m-0">#1d4ed8</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#1e40af" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-800)</p>
    <p class="m-0">#1e40af</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#1e3a8a" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-900)</p>
    <p class="m-0">#1e3a8a</p>
  </div>

  <div class="flex flex-col leading-tight">
    <svg width="224" height="100" class="mb-3 border rounded">
      <path d="M 0 0 H 224 V 100 H 0 Z" fill="#172554" />
    </svg>

    <p class="m-0 mb-1 font-bold">var(--color-blue-950)</p>
    <p class="m-0">#172554</p>
  </div>
</div>
