UI.MD

Search documentation

Search for components, guides, and tokens

Installation

Set up UI.MD in your project and install your first component.

Setup

Two steps get the full design system into your project.

1. Initialize shadcn

$
npx shadcn@latest init

Sets up the shadcn CLI and creates a components.json config in your project root.

Note: When the CLI asks for a style, pick a Radix-based one (radix-nova or new-york). I built these components on Radix. The Base UI style (base-nova) rewrites Radix props during install, so it isn't supported yet.

2. Install the base theme

$
npx shadcn@latest add https://ui.mattdowney.com/r/base.json

Adds the OKLCH color tokens, custom type scale, and spacing variables to your CSS. All UI.MD components expect these tokens to be present.

Adding components

Install any component by pointing the CLI at its registry URL.

$
npx shadcn@latest add https://ui.mattdowney.com/r/button.json

The CLI downloads the component source into your components/ui/ directory and installs any npm dependencies it needs (Radix primitives, cva, etc.).

Swap button for any component name to install that one instead. Every component page has a copy-paste install command.

Install by namespace

Register the namespace once, then install any component by name.

Add the registry to the registries field in your components.json:

{
  "registries": {
    "@uimd": "https://ui.mattdowney.com/r/{name}.json"
  }
}

Then install any component by name, no URL needed:

$
npx shadcn@latest add @uimd/button

What's available

The registry includes components, utilities, and a base theme.

base.jsonOKLCH color tokens, type scale, spacing, shadows, and radii
ComponentsButton, Card, Dialog, Input, Select, Combobox, and more
Utilitiescn() class merging, shared layout tokens for cards and modals

Usage

Import from your local components directory and use like any React component.

import { Button } from "@/components/ui/button"

export function Example() {
  return <Button variant="outline">Click me</Button>
}

Next steps