Condensed Uppercase Button Pair
Rectangular small-radius buttons with icon plus uppercase condensed label: a solid pale-grey primary and a translucent secondary on cobalt; on paper the primary inverts to solid cobalt with pale text and secondary outlines in hairline.
Rebuilt from hermes-agent.nousresearch.com in the Electric Ultramarine Engraving style.
Looks exactly like hermes-agent.nousresearch.com: brings its fonts and colours, namespaced so your own theme stays untouched.
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, onPrimary, onSecondary, and surface ("cobalt" | "paper") for the starting background. The small toggle under the buttons switches the surface variant; hover triggers the 160deg gradient sweep over 150ms.
components/pale-pill-buttons.tsx
import { useState } from "react"; type Props = { primaryLabel?: string; secondaryLabel?: string; onPrimary?: () => void; onSecondary?: () => void; surface?: "cobalt" | "paper"; }; function DownloadIcon() { return ( <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> <path d="M12 4v11" /> <path d="m7 11 5 5 5-5" /> <path d="M5 20h14" /> </svg> ); } function CloudIcon() { return ( <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" aria-hidden="true"> <path d="M7 18a4 4 0 0 1-.5-7.97A5.5 5.5 0 0 1 17 8.5a4.75 4.75 0 0 1 0 9.5z" /> </svg> ); } export default function CondensedButtonPair({ primaryLabel = "Download for Linux", secondaryLabel = "Start in the browser", onPrimary, onSecondary, surface = "cobalt", }: Props) { const [mode, setMode] = useState(surface); const onPaper = mode === "paper"; const base = "relative inline-flex items-center gap-2 h-9 px-4 rounded-sm font-display uppercase text-[15px] tracking-[0.01em] whitespace-nowrap bg-no-repeat bg-[length:100%_320%] bg-[position:0_100%] hover:bg-[position:0_0%] transition-[background-position,color,border-color] duration-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-paper"; const primary = onPaper ? "text-paper bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-cobalt-deep)_20%,var(--color-cobalt-deep)_100%)] bg-cobalt hover:text-paper" : "text-cobalt bg-paper bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-paper-tint)_20%,var(--color-paper-tint)_100%)] hover:text-cobalt-deep"; const secondary = onPaper ? "text-cobalt-deep border border-cobalt-deep/30 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-cobalt)_20%,var(--color-cobalt)_100%)] hover:text-paper" : "text-paper bg-hairline-light/20 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-link-blue)_20%,var(--color-link-blue)_100%)] hover:text-paper"; return ( <div className={`flex flex-col gap-4 p-6 sm:p-10 ${onPaper ? "bg-paper" : "bg-cobalt"}`}> <div className="flex flex-wrap items-center gap-2"> <button type="button" onClick={onPrimary} className={`${base} ${primary}`}> <DownloadIcon /> <span>{primaryLabel}</span> </button> <button type="button" onClick={onSecondary} className={`${base} ${secondary}`}> <CloudIcon /> <span>{secondaryLabel}</span> </button> </div> <button type="button" onClick={() => setMode(onPaper ? "cobalt" : "paper")} className={`self-start font-mono text-[11px] uppercase underline underline-offset-4 ${onPaper ? "text-cobalt-deep" : "text-paper"}`} > Preview on {onPaper ? "cobalt" : "paper"} </button> </div> ); }import { useState } from "react"; type Props = { primaryLabel?: string; secondaryLabel?: string; onPrimary?: () => void; onSecondary?: () => void; surface?: "cobalt" | "paper"; }; function DownloadIcon() { return ( <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> <path d="M12 4v11" /> <path d="m7 11 5 5 5-5" /> <path d="M5 20h14" /> </svg> ); } function CloudIcon() { return ( <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" aria-hidden="true"> <path d="M7 18a4 4 0 0 1-.5-7.97A5.5 5.5 0 0 1 17 8.5a4.75 4.75 0 0 1 0 9.5z" /> </svg> ); } export default function CondensedButtonPair({ primaryLabel = "Download for Linux", secondaryLabel = "Start in the browser", onPrimary, onSecondary, surface = "cobalt", }: Props) { const [mode, setMode] = useState(surface); const onPaper = mode === "paper"; const base = "relative inline-flex items-center gap-2 h-9 px-4 rounded-sm font-sans uppercase text-[15px] tracking-[0.01em] whitespace-nowrap bg-no-repeat bg-[length:100%_320%] bg-[position:0_100%] hover:bg-[position:0_0%] transition-[background-position,color,border-color] duration-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground"; const primary = onPaper ? "text-foreground bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-primary)_20%,var(--color-primary)_100%)] bg-background hover:text-foreground" : "text-background bg-foreground bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-foreground)_20%,var(--color-foreground)_100%)] hover:text-primary/90"; const secondary = onPaper ? "text-primary/90 border border-primary/30 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-background)_20%,var(--color-background)_100%)] hover:text-foreground" : "text-foreground bg-border/20 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-primary)_20%,var(--color-primary)_100%)] hover:text-foreground"; return ( <div className={`flex flex-col gap-4 p-6 sm:p-10 ${onPaper ? "bg-foreground" : "bg-background"}`}> <div className="flex flex-wrap items-center gap-2"> <button type="button" onClick={onPrimary} className={`${base} ${primary}`}> <DownloadIcon /> <span>{primaryLabel}</span> </button> <button type="button" onClick={onSecondary} className={`${base} ${secondary}`}> <CloudIcon /> <span>{secondaryLabel}</span> </button> </div> <button type="button" onClick={() => setMode(onPaper ? "cobalt" : "paper")} className={`self-start font-mono text-[11px] uppercase underline underline-offset-4 ${onPaper ? "text-primary/90" : "text-foreground"}`} > Preview on {onPaper ? "cobalt" : "paper"} </button> </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: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.