Cards & content / Badges & tags

Inline Keycap Hint

Tiny rounded keycap chips with a subtle inset shadow, set inline within body copy to show shortcuts.

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

npx shadcn@latest add https://justyoink.it/r/obsidian-farewell-editorial/blocks/keycap-inline.json

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

Usage

Props: before, keys, after, altKeys, tail. Each keys array renders as a row of inline keycap chips within the paragraph.

components/keycap-inline.tsx
export default function InlineKeycapHint({ before = "Press", keys = ["⌘", "K"], after = "to open the quick switcher, or", altKeys = ["⇧", "P"], tail = "to jump between profiles." }: { before?: string; keys?: string[]; after?: string; altKeys?: string[]; tail?: string }) {
  const Keys = ({ items }: { items: string[] }) => (
    <span className="mx-0.5 inline-flex items-center gap-0.5 align-baseline">
      {items.map((k, i) => (
        <kbd key={i} className="inline-flex h-[1.4em] min-w-[1.6em] items-center justify-center rounded-md border border-hairline bg-surface-tint px-1.5 font-sans text-caption text-ink shadow-inset-soft">
          {k}
        </kbd>
      ))}
    </span>
  );
  return (
    <p className="max-w-md font-sans text-body text-muted">
      {before} <Keys items={keys} /> {after} <Keys items={altKeys} /> {tail}
    </p>
  );
}

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