Center

Layout helper that centers content horizontally and vertically in a narrow, text-centered column. Handy for empty states, auth screens and simple heroes.

src/registry/ui/center.tsx/r/center.json

Installation#

bash
npx shadcn@latest add @minidev/center

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/center.json

Usage#

tsx
import { Center } from "@/components/ui/center"

export function Example() {
  return <Center />
}

API reference#

Center props
PropTypeDefault
childrenReact.ReactNode-
classNamestring-
All layout components