Blur sheet
Blur sheet is a set of five decorative right-edge side panels (SoftBlurSheet, HeavyBlurSheet, DarkBlurSheet, TintBlurSheet, GradientBlurSheet) that share one API and differ only in their backdrop blur and scrim. The panel stays opaque (bg-card) while the backdrop carries the visual effect.


Installed with shadcn add · 2 workarounds · theme from registry.json
- applied the registry's theme (tokens, fonts and CSS from the registry preview settings)
- installed base item https://ai2.design/r/tokens.json (registry preview settings)
Installation
Requires @ai2 in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import { SoftBlurSheet } from "@/components/ui/sheet-blur"export function Example() { return ( <SoftBlurSheet trigger="Open panel" title="Details" size="md"> <p>Panel content goes here.</p> </SoftBlurSheet> )}- You need a right-side drawer or detail panel with a blurred or tinted backdrop and an opaque content surface.
- You want one of five distinct backdrop treatments (soft blur, heavy blur, dark scrim, primary tint, gradient) without writing the overlay yourself.
- You want an uncontrolled sheet with a built-in trigger, or a controlled sheet driven by open and onOpenChange.
- You need a self-contained overlay with no Radix dependency and no portal, with Escape and backdrop-click dismissal built in.
Examples
Uncontrolled sheet with a custom trigger
A HeavyBlurSheet opened by a trigger element. The trigger is cloned so it receives aria-haspopup, aria-expanded and the open handler.
import { Button } from "@/components/ui/button"import { HeavyBlurSheet } from "@/components/ui/sheet-blur"export function SettingsDrawer() { return ( <HeavyBlurSheet size="lg" title="Settings" trigger={<Button variant="outline">Settings</Button>} > <p>Adjust your preferences here.</p> </HeavyBlurSheet> )}Controlled sheet
A DarkBlurSheet whose open state is owned by the parent, so it can be opened and closed programmatically.
"use client"import * as React from "react"import { DarkBlurSheet } from "@/components/ui/sheet-blur"export function ControlledDrawer() { const [open, setOpen] = React.useState(false) return ( <DarkBlurSheet open={open} onOpenChange={setOpen} title="Order summary" size="xl" > <p>Review your order before checkout.</p> </DarkBlurSheet> )}Tinted sheet opened by default
A TintBlurSheet that starts open via defaultOpen and uses a custom class on the panel.
import { TintBlurSheet } from "@/components/ui/sheet-blur"export function WelcomeSheet() { return ( <TintBlurSheet defaultOpen size="sm" title="Welcome" className="font-medium" > <p>Thanks for joining the beta.</p> </TintBlurSheet> )}Gradient sheet with a left-aligned size
A GradientBlurSheet at the sm size, using the default trigger label.
import { GradientBlurSheet } from "@/components/ui/sheet-blur"export function QuickInfo() { return ( <GradientBlurSheet size="sm" title="Quick info"> <p>Short notes appear here.</p> </GradientBlurSheet> )}API reference
Accessibility
- The panel has role="dialog" and aria-modal="true" and receives focus when the open animation completes (tabIndex=-1).
- The trigger carries aria-haspopup="dialog" and aria-expanded reflecting the open state; the state is on the real trigger rather than a wrapper span.
- The close button has aria-label="Close" and is reachable by keyboard; it shows a visible focus ring.
- Escape closes the sheet via a window keydown listener while it is open.
- The dialog has no aria-labelledby, so supply a title prop (rendered as h2) and consider giving the panel an accessible name when title is omitted.
- The component does not implement a focus trap or return focus to the trigger on close; add these in the surrounding application if required.
- Under prefers-reduced-motion the slide is replaced by a fade and the transition duration is 0.
- Text contrast relies on text-card-foreground and text-muted-foreground tokens on the bg-card surface; verify contrast for custom className overrides.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Blur sheet" component (ai2/sheet-blur) from its shadcn registry.1. Install it with: npx shadcn@latest add @ai2/sheet-blur2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: size, trigger, title, children, className, open, defaultOpen, onOpenChange.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { SoftBlurSheet } from "@/components/ui/sheet-blur"export function Example() { return ( <SoftBlurSheet trigger="Open panel" title="Details" size="md"> <p>Panel content goes here.</p> </SoftBlurSheet> )}```Files & dependencies
- registry/ai2/styled/sheet-blur.tsx→ components/ui/sheet-blur.tsx