Dark Glass Button Pair
Primary button: #141517 fill, 12px radius, gradient hairline border and semibold text with optional chevron; secondary is a transparent ghost button in gray text. Inverted white variant used for Compose and Send.
Rebuilt from resend.com in the Obsidian Serif Glow style.
npx shadcn@latest add https://justyoink.it/r/obsidian-serif-glow/blocks/dark-glass-button-pair.json
Looks exactly like resend.com: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/obsidian-serif-glow/mine/dark-glass-button-pair.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: primaryLabel, secondaryLabel, invertedLabel, click handlers for each, and showInverted to toggle the white Compose/Send variant. Renders standalone with no props.
components/dark-glass-button-pair.tsx
import { useState } from "react"; type Props = { primaryLabel?: string; secondaryLabel?: string; invertedLabel?: string; onPrimaryClick?: () => void; onSecondaryClick?: () => void; onInvertedClick?: () => void; showInverted?: boolean; }; const Chevron = () => ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true" className="transition-transform duration-200 group-hover:translate-x-0.5"> <path d="M6 3.5 10.5 8 6 12.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); export default function DarkGlassButtonPair({ primaryLabel = "Start building", secondaryLabel = "Read the guide", invertedLabel = "Compose", onPrimaryClick, onSecondaryClick, onInvertedClick, showInverted = true, }: Props) { const [pressed, setPressed] = useState(false); return ( <div className="flex min-h-[240px] w-full flex-col items-center justify-center gap-6 bg-background p-8"> <div className="flex flex-wrap items-center justify-center gap-4"> <button type="button" onClick={onPrimaryClick} onMouseDown={() => setPressed(true)} onMouseUp={() => setPressed(false)} onMouseLeave={() => setPressed(false)} className={`group inline-flex items-center gap-2 rounded-xl bg-[#141517] px-5 py-3 text-ui font-semibold text-primary/90 border border-hairline transition-all duration-200 hover:border-secondary/60 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue ${pressed ? "shadow-none scale-[0.98]" : "shadow-[0_6px_20px_rgba(0,0,0,0.6),inset_0_1px_0_rgba(255,255,255,0.08)]"}`} > {primaryLabel} <span className="text-muted group-hover:text-primary"><Chevron /></span> </button> <button type="button" onClick={onSecondaryClick} className="group inline-flex items-center gap-2 rounded-xl bg-transparent px-5 py-3 text-ui font-semibold text-secondary transition-colors duration-150 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue" > {secondaryLabel} <Chevron /> </button> {showInverted && ( <button type="button" onClick={onInvertedClick} className="inline-flex items-center gap-2 rounded-xl bg-paper px-5 py-3 text-ui font-semibold text-[#0a0a0a] transition-all duration-150 hover:brightness-90 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue" > {invertedLabel} </button> )} </div> </div> ); }import { useState } from "react"; type Props = { primaryLabel?: string; secondaryLabel?: string; invertedLabel?: string; onPrimaryClick?: () => void; onSecondaryClick?: () => void; onInvertedClick?: () => void; showInverted?: boolean; }; const Chevron = () => ( <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true" className="transition-transform duration-200 group-hover:translate-x-0.5"> <path d="M6 3.5 10.5 8 6 12.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </svg> ); export default function DarkGlassButtonPair({ primaryLabel = "Start building", secondaryLabel = "Read the guide", invertedLabel = "Compose", onPrimaryClick, onSecondaryClick, onInvertedClick, showInverted = true, }: Props) { const [pressed, setPressed] = useState(false); return ( <div className="flex min-h-[240px] w-full flex-col items-center justify-center gap-6 bg-background p-8"> <div className="flex flex-wrap items-center justify-center gap-4"> <button type="button" onClick={onPrimaryClick} onMouseDown={() => setPressed(true)} onMouseUp={() => setPressed(false)} onMouseLeave={() => setPressed(false)} className={`group inline-flex items-center gap-2 rounded-2xl bg-card px-5 py-3 text-obsidian-ui font-semibold text-foreground/90 border border-border transition-all duration-200 hover:border-muted-foreground/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${pressed ? "shadow-none scale-[0.98]" : "shadow-[0_6px_20px_rgba(0,0,0,0.6),inset_0_1px_0_rgba(255,255,255,0.08)]"}`} > {primaryLabel} <span className="text-muted-foreground group-hover:text-foreground"><Chevron /></span> </button> <button type="button" onClick={onSecondaryClick} className="group inline-flex items-center gap-2 rounded-2xl bg-transparent px-5 py-3 text-obsidian-ui font-semibold text-muted-foreground transition-colors duration-150 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary" > {secondaryLabel} <Chevron /> </button> {showInverted && ( <button type="button" onClick={onInvertedClick} className="inline-flex items-center gap-2 rounded-2xl bg-primary px-5 py-3 text-obsidian-ui font-semibold text-[#0a0a0a] transition-all duration-150 hover:brightness-90 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary" > {invertedLabel} </button> )} </div> </div> ); }
Quality checks
Automated, in a real browser · 5d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: not passed1 hard-coded colour (text-[#0a0a0a]). These ignore the theme and break dark mode.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.