Skip to content
DGA UI

Installation

Add the DGA style to a new or existing project with the shadcn CLI.

On this page

DGA UI needs a React project with Tailwind CSS v4. These steps use Next.js. Other frameworks are covered at the end.

New project

Create a Next.js app

Terminal
npx create-next-app@latest my-app --ts --tailwind --app

Initialise DGA UI

Terminal
npx shadcn@latest init https://dga.omqkhafi.dev/r/dga.json

dga is a registry:base item. It writes components.json with iconLibrary: "hugeicons", rtl: true, the Base UI style and the @dga registry, so npx shadcn@latest add @dga/button works straight away. It installs @base-ui/react, cn, class-variance-authority and Hugeicons. It also adds every DGA token, the dark theme and the responsive modes to globals.css, and sets up IBM Plex Sans Arabic with next/font.

Set the language and direction

app/layout.tsx
<html lang="ar" dir="rtl">

Use lang="en" dir="ltr" for English pages. Components need no other change.

Existing shadcn project

If the project already has a components.json, add the style directly:

Terminal
npx shadcn@latest add https://dga.omqkhafi.dev/r/dga-style.json

The CLI merges DGA's values into your globals.css. Your existing shadcn variables (--background, --primary …) now point at DGA tokens.

Tokens only

To use the DGA tokens without any components (for example in an existing design system), add just the tokens:

Terminal
npx shadcn@latest add https://dga.omqkhafi.dev/r/dga-tokens.json

Use the @dga namespace

init …/dga.json registers it for you. In other projects, register it once in components.json:

components.json
{
  "registries": {
    "@dga": "https://dga.omqkhafi.dev/r/{name}.json"
  }
}

Then install items by name:

Terminal
npx shadcn@latest add @dga/button @dga/badge

Dark mode

Dark tokens apply under either .dark (next-themes, shadcn) or [data-theme="dark"] (the DGA site convention). Both work on <html> or on any element, so a single section can be dark.

page.tsx
<section data-theme="dark">…</section>

Other frameworks

For Vite, React Router or TanStack Start, run the same init command. Outside Next.js the CLI installs the font from @fontsource/ibm-plex-sans-arabic instead of next/font.

What gets installed

ItemTypeContents
dgaregistry:basecomponents.json settings (Hugeicons, RTL, Base UI style, @dga registry); pulls in dga-style
dga-styleregistry:styleDependencies, CSS imports and the cn-* component style map; pulls in dga-tokens, utils and the font
dga-tokensregistry:themeEvery token, light and dark themes, responsive modes, Tailwind theme, shadcn mapping, base layer
utilsregistry:liblib/utils.ts, which re-exports cn from the cn package (no clsx or tailwind-merge)
font-ibm-plex-sans-arabicregistry:fontIBM Plex Sans Arabic 400–700, Arabic and Latin subsets
Edit this page on GitHub (opens in a new tab)