Container

Responsive page container that centers content with side padding and a max width preset: sm, default, lg or full. The basic wrapper for Tailwind layouts.

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

Installation#

bash
npx shadcn@latest add @minidev/container

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/container.json

Usage#

tsx
import { Container } from "@/components/ui/container"

export function Example() {
  return (
    <Container size="sm" className="rounded-xl border border-dashed border-border py-4 text-center text-xs text-fg-muted">
      Container sm
    </Container>
  )
}

API reference#

Container props
PropTypeDefault
size"sm" | "default" | "lg" | "full""default"

Also accepts every prop of <div>, passed through to the root element.

Examples#

All layout components

Learn more