Primitive 01
Button
import { Button } from "@/components/ui";Primary user action trigger. Implements asymmetric tactile corner radius (rounded-tl-[6px] rounded-br-[6px] rounded-bl-[3px] rounded-tr-[2px]), active depth translation (active:translate-y-px), and polymorphic link delegation when href is provided.
Variant & Size Matrix
Variant: solid (Default)
Variant: ghost
Variant: coral
Interface Specification
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "solid" | "ghost" | "coral" | "solid" | Visual weight hierarchy. Solid for primary page action, ghost for secondary, coral for high-intent conversions. |
| size | "sm" | "md" | "lg" | "md" | Scale scale: sm (13px text, 3.5 padding), md (14px, 18px padding), lg (15px, 24px padding). |
| href | string | undefined | When provided, renders as Next.js Link or HTML anchor rather than a button. |
| external | boolean | false | Applies target="_blank" and rel="noopener noreferrer" for external navigation. |
| arrow | boolean | false | Appends an animated diagonal directional glyph with group-hover translation. |
Production Invocations (from app/(marketing)/_components/Hero.tsx)
UTF-8 · LF
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
// Primary CTA from homepage Hero
<Button href="/docs/getting-started" size="lg">
Read Getting Started
</Button>
// Secondary external source link with animated arrow
<Button
variant="ghost"
size="lg"
href="https://github.com/nodemesh/nodemesh"
external
arrow
>
GitHub
</Button>