sigilUI

Diamond

Diamond-shaped container using CSS clip-path with four size presets.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Diamond } from "@sigil-ui/components";

Usage

<Diamond>
  <span className="text-xs">Icon</span>
</Diamond>

Sizes

<Diamond size="sm">S</Diamond>
<Diamond size="md">M</Diamond>
<Diamond size="lg">L</Diamond>
<Diamond size="xl">XL</Diamond>

As an avatar frame

<Diamond size="lg">
  <img src="/avatar.jpg" alt="User" className="w-full h-full object-cover" />
</Diamond>

Styled

<Diamond size="lg" className="bg-[var(--s-primary)] text-white font-bold">
  OK
</Diamond>

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg" | "xl""md"Diamond size (64/96/128/192 px)
childrenReactNode—Content centered inside the diamond
classNamestring—Additional CSS classes