amankaushik481

Center

Component

About

A layout helper that centers its children horizontally and vertically in a narrow, text-centered column, useful for empty states, auth screens and simple hero messages.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Center to your project and fits it to your theme.

Code

How Center is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

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

export default function CenterDemo() {
  return (
    <Center className="min-h-80">
      <h2 className="text-lg font-semibold">No invoices yet</h2>
      <p className="text-sm text-muted-foreground">
        When you create an invoice, it will show up here.
      </p>
    </Center>
  );
}

More by amankaushik481

View all
  • Icon Button

    Icon Button

    14
  • Background Boxes

    Background Boxes

    12
  • Chip Filter

    Chip Filter

    8
  • Typing Text

    Typing Text

    7
  • Treemap Chart

    Treemap Chart

    6
  • File Dropzone

    File Dropzone

    5
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2