abhishek-mallick

Iso Depth

Buttons

About

A CSS primitive that draws the line-art depth and side face beneath a UI element, so a button, card, key or tab appears to stand on a block and sinks into it when pressed.

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

Code

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

Usage.tsx

import IsoDepth, {
  isoDepth,
  isoFace,
  isoSink,
} from "@/components/ui/iso-depth";
import { cn } from "@/lib/utils";

export default function IsoDepthDemo() {
  return (
    <div className="flex min-h-[220px] w-full items-center justify-center bg-background p-10">
      <button
        type="button"
        className="group/iso relative inline-flex h-16 w-44 items-center justify-center"
        style={isoDepth(8)}
      >
        <IsoDepth sink={["active"]} />
        <span
          className={cn(
            isoFace,
            isoSink.active,
            "flex h-full w-full items-center justify-center bg-background text-sm font-medium text-foreground",
          )}
        >
          Press me
        </span>
      </button>
    </div>
  );
}

More by abhishek-mallick

View all
  • Isometric Bars Chart

    Isometric Bars Chart

    13
  • Keys

    Keys

    8
  • Rack

    Rack

    7
  • Isometric Laptop

    Isometric Laptop

    6
  • Nodes

    Nodes

    5
  • Stack

    Stack

    5
  • Isometric Cube

    Isometric Cube

    5
  • Skyline

    Skyline

    4

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Button

    Button

    32
  • Split Button

    Split Button

    32