Skip to main content

Introduction to Blocks

Blocks is an open-source library of accessible and customizable UI blocks that you can copy and paste into your apps. Built with React, Tailwind CSS, and shadcn/ui, Blocks provides production-ready components that are free to use and fully customizable.

What is Blocks?

Blocks is a collection of pre-built UI components designed to accelerate your development workflow. Instead of building common UI patterns from scratch, you can add fully-functional blocks to your project with a single command. Each block is:
  • Production-ready - Built with best practices and real-world usage in mind
  • Accessible - Following WCAG guidelines with proper ARIA attributes
  • Customizable - Full source code that you can modify to match your design
  • Framework-agnostic - Works with Next.js, Remix, Vite, or any React framework

Key Features

60+ UI Blocks

Choose from login forms, dialogs, sidebars, tables, file uploads, command menus, stats dashboards, and more.

shadcn/ui Integration

Built on top of shadcn/ui components, leveraging Radix UI primitives for accessibility and functionality.

Accessible by Default

All blocks follow accessibility best practices with proper semantic HTML, keyboard navigation, and screen reader support.

Copy and Paste

No package dependencies. Add blocks directly to your project using the shadcn CLI, giving you full control over the code.

Available Block Categories

Blocks includes components across 11 categories:
  • AI Components (5 blocks) - Chat interfaces with voice input, model selection, and file attachments
  • Command Menu (3 blocks) - Keyboard-driven command palettes with search and navigation
  • Dialogs (12 blocks) - Modals for confirmations, forms, multi-step wizards, and more
  • File Upload (6 blocks) - Drag-and-drop uploaders with preview, progress, and multi-file support
  • Form Layout (5 blocks) - Complete form patterns with validation and various field layouts
  • Grid List (3 blocks) - Display collections of items in grid or list format
  • Login & Signup (9 blocks) - Authentication forms with social login, SSO, and magic links
  • Onboarding (1 block) - Multi-step onboarding flows
  • Sidebar (6 blocks) - Navigation sidebars with collapsible sections and multiple layouts
  • Stats (15 blocks) - Dashboard statistics with charts, progress bars, and trending indicators
  • Tables (5 blocks) - Data tables with sorting, filtering, actions, and accordion rows

Example Block

Here’s what a login block looks like:
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";

export default function Login01() {
  return (
    <div className="flex items-center justify-center min-h-dvh">
      <div className="flex flex-1 flex-col justify-center px-4 py-10 lg:px-6">
        <div className="sm:mx-auto sm:w-full sm:max-w-sm">
          <h2 className="text-balance text-center text-xl font-semibold text-foreground">
            Log in or create account
          </h2>
          <form action="#" method="post" className="mt-6">
            <Label htmlFor="email" className="font-medium text-foreground">
              Email
            </Label>
            <Input
              type="email"
              id="email"
              name="email"
              autoComplete="email"
              placeholder="[email protected]"
              className="mt-2"
            />
            <Button type="submit" className="mt-4 w-full">
              Sign in
            </Button>
          </form>

          <div className="relative my-6">
            <div className="absolute inset-0 flex items-center">
              <Separator className="w-full" />
            </div>
            <div className="relative flex justify-center text-xs uppercase">
              <span className="bg-background px-2 text-muted-foreground">
                or with
              </span>
            </div>
          </div>

          <Button
            variant="outline"
            className="inline-flex w-full items-center justify-center space-x-2"
            asChild
          >
            <a href="#">
              <GoogleIcon className="size-5" aria-hidden={true} />
              <span className="text-sm font-medium">Sign in with Google</span>
            </a>
          </Button>
        </div>
      </div>
    </div>
  );
}
All blocks use shadcn/ui components like Button, Input, Label, and Separator. You’ll need to install these base components before using blocks.

Next Steps

Installation

Set up your project to use Blocks with the shadcn CLI

Usage

Learn how to add and customize blocks in your project

Open Source

Blocks is free and open source, licensed under the MIT license. You can view the source code, contribute new blocks, or report issues on GitHub.

Build docs developers (and LLMs) love