Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Surface
Elevated surface container with padding and variant options.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/surface.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/surface.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/surface.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/surface.
Import
import { Surface } from "@/components/ui/surface"example.tsx
import { Surface } from "@/components/ui/surface"export function Example() { return <Surface>Surface content</Surface>}API Reference
Surface
| Prop | Type | Default |
|---|---|---|
| variant | "solid" | "soft" | "outline" | "ghost" | "solid" |
| padding | "none" | "sm" | "md" | "lg" | "md" |