---
title: "Introduction"
url: "https://sarthakmishra.com/riff-ui"
description: "Beautifully designed and shadcn/ui compatible React components built on UI SDK, with satisfying microinteractions."
image: "https://sarthakmishra.com/riff-og-image.webp"
---

[View HTML](https://sarthakmishra.com/riff-ui) · [Site index](https://sarthakmishra.com/llms.txt)

# Introduction

Beautifully designed React components with satisfying microinteractions.

Riff is the set of components I built for this site, packaged so you can use them too: the table of contents, diagrams, the dock, search, the video player and the small interactive pieces in between. Each is one React 19 file and one native CSS file that you copy into your project and own. The few that need an accessible primitive build on [UI SDK](https://www.npmjs.com/package/@ui-sdk/react).

Every component is documented in plain TypeScript and CSS, so you and your coding agents can read, compose and restyle it.

## Quickstart

Use these steps in a React 19 project with an existing `components.json`. For a new app, start with [Installation](https://sarthakmishra.com/riff-ui/installation).

1. Register the namespace

   Add the `@riff` registry to `components.json`. The CLI replaces `{name}` with the component name.

   ```json
   {
     "registries": {
       "@riff": "https://sarthakmishra.com/riff-ui/r/{name}.json"
     }
   }
   ```

2. Add a component

   ```bash
   pnpm dlx shadcn@latest add @riff/file-tree
   ```

   The CLI writes `file-tree.tsx` and `file-tree.css` to your UI directory and saves the MIT license at `licenses/riff-ui.txt`. Components that need UI SDK or another package install it too.

3. Render it

   ```tsx
   import { File, FileTree, Folder } from '@/components/ui/file-tree';

   export function Files() {
     return (
       <FileTree label="Files">
         <Folder name="src">
           <File name="main.tsx" />
         </Folder>
       </FileTree>
     );
   }
   ```

## Install without a namespace

Pass a GitHub path to `shadcn add` when you want one component without editing `components.json`:

```bash
pnpm dlx shadcn@latest add SarthakMishra/riff-ui/steps
```

The [registry index](https://sarthakmishra.com/riff-ui/r/registry.json) at `/riff-ui/r/registry.json` lists every available component.

## Structured data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "WebSite",
      "@id": "https://sarthakmishra.com/#website",
      "url": "https://sarthakmishra.com/",
      "name": "Sarthak Mishra",
      "publisher": {
        "@id": "https://sarthakmishra.com/#person"
      },
      "inLanguage": "en"
    },
    {
      "@type": "Person",
      "@id": "https://sarthakmishra.com/#person",
      "name": "Sarthak Mishra",
      "url": "https://sarthakmishra.com/about",
      "jobTitle": "Design Engineer",
      "image": "https://sarthakmishra.com/og-images/sarthak-mishra.webp",
      "sameAs": [
        "https://github.com/SarthakMishra",
        "https://www.linkedin.com/in/itssarthakmishra/",
        "https://x.com/MishraMishry"
      ]
    },
    {
      "@type": "WebPage",
      "@id": "https://sarthakmishra.com/riff-ui#webpage",
      "url": "https://sarthakmishra.com/riff-ui",
      "name": "Riff UI - Beautifully Designed React Components",
      "description": "Beautifully designed and shadcn/ui compatible React components built on UI SDK, with satisfying microinteractions.",
      "inLanguage": "en",
      "isPartOf": {
        "@id": "https://sarthakmishra.com/#website"
      },
      "about": {
        "@id": "https://sarthakmishra.com/#person"
      }
    }
  ]
}
```
