Buttons & actions / Buttons

Dark Pill Disclosure Button

Charcoal pill with white medium-weight label and a small chevron, set on the dark hero.

Rebuilt from arc.net in the Obsidian Farewell Editorial style.

npx shadcn@latest add https://justyoink.it/r/obsidian-farewell-editorial/blocks/dark-pill-button.json

Looks exactly like arc.net: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Props: `label` for the button text and `panelText` for the content revealed below. Click toggles the disclosure, rotating the chevron; hover lightens the charcoal fill.

components/dark-pill-button.tsx
import { useState } from "react";

export default function DarkPillDisclosureButton({
  label = "Read the notice",
  panelText = "Here is a little more detail, revealed beneath the button when you open it.",
}: {
  label?: string;
  panelText?: string;
}) {
  const [open, setOpen] = useState(false);
  return (
    <div className="flex min-h-[240px] w-full flex-col items-center justify-start bg-canvas-dark px-6 py-16">
      <button
        type="button"
        aria-expanded={open}
        aria-controls="pill-panel"
        onClick={() => setOpen((o) => !o)}
        className="inline-flex items-center gap-2 rounded-pill bg-surface-pill-dark px-6 py-[15px] font-sans text-ui font-medium text-white transition-colors duration-200 hover:bg-[#3a3a3a] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring"
      >
        {label}
        <svg
          width="12"
          height="12"
          viewBox="0 0 12 12"
          fill="none"
          aria-hidden="true"
          className={`opacity-70 transition-transform duration-[250ms] motion-reduce:transition-none ${open ? "rotate-180" : ""}`}
        >
          <path d="M2.5 4.5 6 8l3.5-3.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" />
        </svg>
      </button>
      <div
        id="pill-panel"
        className={`grid transition-[grid-template-rows] duration-[250ms] motion-reduce:transition-none ${open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"}`}
      >
        <div className="overflow-hidden">
          <p className="mt-4 max-w-xs text-center font-sans text-body text-on-dark-muted">{panelText}</p>
        </div>
      </div>
    </div>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Obsidian Farewell Editorial

The whole style →

Hairline FAQ Accordion

Accordions

Signature Scatter Hero

Heroes

Sticky Glass Promo Banner

Toasts & snackbars

Fading Vertical Timeline

Lists

Centered Serif Section Header

Other

Pill Tab Switcher

Tab bars