1Sponsor

Center

Centers children horizontally and vertically

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/center.json

Usage

import { Center } from "@/components/ui/center";
<Center>
  <Text>Centered content</Text>
</Center>

API Reference

Center

PropTypeDefault
childrenReactNoderequired
axis"both" | "horizontal" | "vertical""both"