adit-firdaus

Box

Cards

About

A polymorphic layout primitive for applying iOS-style surface color, padding, border radius and elevation to any element without using borders.

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

Code

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

Usage.tsx

import { Box } from "@/components/ui/box";

export default function BoxPolymorphicDemo() {
  return (
    <div className="flex min-h-[240px] w-full items-center justify-center bg-background p-8">
      <Box
        as="a"
        href="#box"
        surface="base"
        padding={4}
        radius="card"
        style={{
          display: "block",
          color: "var(--may-color-tint)",
          textDecoration: "none",
        }}
      >
        Continue to Storage &amp; iCloud Usage
      </Box>
    </div>
  );
}

More by adit-firdaus

View all
  • Steps

    Steps

    28
  • Popover

    Popover

    3
  • Adaptive Card

    Adaptive Card

  • Pagination

    Pagination

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Statistics Card 7

    Statistics Card 7

    327
  • Statistics Card 2

    Statistics Card 2

    305
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    625
  • Card Studio

    Card Studio

    5
  • The Item one

    The Item one

    4
  • Weather Card

    Weather Card

    65
  • Card

    Card

    9