A searchable sheet listing every keyboard shortcut an app binds
pnpm dlx shadcn@latest add https://notchset.dev/r/shortcut-sheet.jsonEvery key an app binds, found by words or tried by pressing it.
Every shadcn style · one file
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { Keyboard } from "@/lib/notchset/icons";
import { Button } from "@/components/ui/notchset/button";
import { StageLayer } from "@/lib/notchset/portal";
import { ShortcutSheet, type ShortcutGroup } from "@/components/ui/notchset/shortcut-sheet";
/*
* The sheet open at first paint over a plain frame that is its stage, centred and sized to its content, one scroller
* when the frame is short. Fed by the app's key map, so it prints only keys that work. Find narrows it by words or by
* pressing a key; a word that matches nothing says so. The knobs pick whose keys it holds (a CRM, an editor, a mail
* app), the G-then chords, and its line under the title. The demo leaves ? and ⌘/ to the page around it (bindKeys off).
* The frame grows to the whole sheet, every row in view, with room under it for the dialog's shadow, which it never cuts.
*/
/* the dialog sits 16px inside its layer; its shadow reaches 80px below it, so the frame keeps the rest under the layer */
const INSET = 16;
const SHADOW_ROOM = 64;
/* the sheet's whole height: the dialog as drawn, plus whatever its scroller still hides */
function sheetHeight(layer: HTMLElement) {
const d = layer.querySelector<HTMLElement>("[role=dialog]");
if (!d) return null;
const scroller = [...d.querySelectorAll<HTMLElement>("*")].find((e) => e.scrollHeight > e.clientHeight + 1 && /auto|scroll/.test(getComputedStyle(e).overflowY));
return Math.ceil(d.offsetHeight + (scroller ? scroller.scrollHeight - scroller.clientHeight : 0));
}
type Use = "crm" | "editor" | "mail";
const ANYWHERE: ShortcutGroup = ["Anywhere", [["⌘K", "Search and commands"], ["?", "This sheet"], ["⌘Z", "Undo the last change"], ["Esc", "Close the top layer"]]];
const SETS: Record<Use, { groups: ShortcutGroup[]; chords: ShortcutGroup }> = {
crm: {
groups: [["Lists and records", [["J", "Next, in lists and open records"], ["K", "Previous"], ["↵", "Open"], ["X", "Select"], ["C", "New record"]]]],
chords: ["Go to", [[{ keys: "G", then: "H" }, "Home"], [{ keys: "G", then: "I" }, "Inbox"], [{ keys: "G", then: "P" }, "Pipeline"]]],
},
editor: {
groups: [["Format", [["⌘B", "Bold"], ["⌘I", "Italic"], ["⌘K", "Link the selection"], ["⌘L", "Numbered list"]]], ["Blocks", [["/", "Insert a block"], ["⌘1", "Heading 1"], ["⌥↑", "Move the block up"]]]],
chords: ["Go to", [[{ keys: "G", then: "D" }, "Documents"], [{ keys: "G", then: "S" }, "Shared with me"]]],
},
mail: {
groups: [["Messages", [["J", "Next message"], ["K", "Previous message"], ["R", "Reply"], ["E", "Archive"], ["#", "Delete"]]]],
chords: ["Go to", [[{ keys: "G", then: "I" }, "Inbox"], [{ keys: "G", then: "S" }, "Starred"], [{ keys: "G", then: "D" }, "Drafts"]]],
},
};
export default function ShortcutSheetDemo() {
const use = "crm" as Use;
const chords = true;
const line = false;
const set = SETS[use];
const [open, setOpen] = React.useState(true);
const [layer, setLayer] = React.useState<HTMLDivElement | null>(null);
/* the tallest the sheet has been for these knobs: Find narrowing it never pulls the frame in under the hand */
const knobs = `${use}|${chords}|${line}`;
const [kept, setKept] = React.useState({ knobs, tall: 0 });
const tall = kept.knobs === knobs ? kept.tall : 0;
React.useEffect(() => {
if (!layer) return;
const fit = () => {
const h = sheetHeight(layer);
if (!h) return;
setKept((k) => {
const next = Math.max(k.knobs === knobs ? k.tall : 0, h + 2 * INSET + SHADOW_ROOM);
return k.knobs === knobs && k.tall === next ? k : { knobs, tall: next };
});
};
fit();
const mo = new MutationObserver(fit);
mo.observe(layer, { childList: true, subtree: true });
const ro = new ResizeObserver(fit);
ro.observe(layer);
return () => (mo.disconnect(), ro.disconnect());
}, [layer, knobs]);
const groups = [ANYWHERE, ...(chords ? [set.chords] : []), ...set.groups];
return (
<div className="relative isolate flex w-full max-w-[var(--ns-width-xl)] flex-col" style={{ height: open && tall ? tall : 470 }}>
<div className="flex flex-1 items-center justify-center">
{!open && (
<Button size="sm" onClick={() => setOpen(true)}>
<Keyboard />
Keyboard shortcuts
</Button>
)}
</div>
{/* the stage's layer, its shadow left whole: the dialog centres in it and its shadow falls into the room below */}
<div ref={setLayer} data-ns-stage-layer="" className="pointer-events-none absolute inset-x-0 top-0 z-[60] [contain:layout]" style={{ bottom: SHADOW_ROOM }} />
{layer && (
<StageLayer value={layer}>
<ShortcutSheet key={use} open={open} onOpenChange={setOpen} groups={groups} description={line ? "Every key here works on this page; Find takes words or a key." : undefined} bindKeys={false} labels={{ tryIt: "" }} />
</StageLayer>
)}
</div>
);
}"use client";
import * as React from "react";
import { Keyboard } from "@/lib/notchset/icons";
import { Button } from "@/components/ui/notchset/button";
import { StageLayer } from "@/lib/notchset/portal";
import { ShortcutSheet, type ShortcutGroup } from "@/components/ui/notchset/shortcut-sheet";
/*
* The sheet open at first paint over a plain frame that is its stage, centred and sized to its content, one scroller
* when the frame is short. Fed by the app's key map, so it prints only keys that work. Find narrows it by words or by
* pressing a key; a word that matches nothing says so. The knobs pick whose keys it holds (a CRM, an editor, a mail
* app), the G-then chords, and its line under the title. The demo leaves ? and ⌘/ to the page around it (bindKeys off).
* The frame grows to the whole sheet, every row in view, with room under it for the dialog's shadow, which it never cuts.
*/
/* the dialog sits 16px inside its layer; its shadow reaches 80px below it, so the frame keeps the rest under the layer */
const INSET = 16;
const SHADOW_ROOM = 64;
/* the sheet's whole height: the dialog as drawn, plus whatever its scroller still hides */
function sheetHeight(layer: HTMLElement) {
const d = layer.querySelector<HTMLElement>("[role=dialog]");
if (!d) return null;
const scroller = [...d.querySelectorAll<HTMLElement>("*")].find((e) => e.scrollHeight > e.clientHeight + 1 && /auto|scroll/.test(getComputedStyle(e).overflowY));
return Math.ceil(d.offsetHeight + (scroller ? scroller.scrollHeight - scroller.clientHeight : 0));
}
type Use = "crm" | "editor" | "mail";
const ANYWHERE: ShortcutGroup = ["Anywhere", [["⌘K", "Search and commands"], ["?", "This sheet"], ["⌘Z", "Undo the last change"], ["Esc", "Close the top layer"]]];
const SETS: Record<Use, { groups: ShortcutGroup[]; chords: ShortcutGroup }> = {
crm: {
groups: [["Lists and records", [["J", "Next, in lists and open records"], ["K", "Previous"], ["↵", "Open"], ["X", "Select"], ["C", "New record"]]]],
chords: ["Go to", [[{ keys: "G", then: "H" }, "Home"], [{ keys: "G", then: "I" }, "Inbox"], [{ keys: "G", then: "P" }, "Pipeline"]]],
},
editor: {
groups: [["Format", [["⌘B", "Bold"], ["⌘I", "Italic"], ["⌘K", "Link the selection"], ["⌘L", "Numbered list"]]], ["Blocks", [["/", "Insert a block"], ["⌘1", "Heading 1"], ["⌥↑", "Move the block up"]]]],
chords: ["Go to", [[{ keys: "G", then: "D" }, "Documents"], [{ keys: "G", then: "S" }, "Shared with me"]]],
},
mail: {
groups: [["Messages", [["J", "Next message"], ["K", "Previous message"], ["R", "Reply"], ["E", "Archive"], ["#", "Delete"]]]],
chords: ["Go to", [[{ keys: "G", then: "I" }, "Inbox"], [{ keys: "G", then: "S" }, "Starred"], [{ keys: "G", then: "D" }, "Drafts"]]],
},
};
export default function ShortcutSheetDemo() {
const use = "crm" as Use;
const chords = true;
const line = false;
const set = SETS[use];
const [open, setOpen] = React.useState(true);
const [layer, setLayer] = React.useState<HTMLDivElement | null>(null);
/* the tallest the sheet has been for these knobs: Find narrowing it never pulls the frame in under the hand */
const knobs = `${use}|${chords}|${line}`;
const [kept, setKept] = React.useState({ knobs, tall: 0 });
const tall = kept.knobs === knobs ? kept.tall : 0;
React.useEffect(() => {
if (!layer) return;
const fit = () => {
const h = sheetHeight(layer);
if (!h) return;
setKept((k) => {
const next = Math.max(k.knobs === knobs ? k.tall : 0, h + 2 * INSET + SHADOW_ROOM);
return k.knobs === knobs && k.tall === next ? k : { knobs, tall: next };
});
};
fit();
const mo = new MutationObserver(fit);
mo.observe(layer, { childList: true, subtree: true });
const ro = new ResizeObserver(fit);
ro.observe(layer);
return () => (mo.disconnect(), ro.disconnect());
}, [layer, knobs]);
const groups = [ANYWHERE, ...(chords ? [set.chords] : []), ...set.groups];
return (
<div className="relative isolate flex w-full max-w-[var(--ns-width-xl)] flex-col" style={{ height: open && tall ? tall : 470 }}>
<div className="flex flex-1 items-center justify-center">
{!open && (
<Button size="sm" onClick={() => setOpen(true)}>
<Keyboard />
Keyboard shortcuts
</Button>
)}
</div>
{/* the stage's layer, its shadow left whole: the dialog centres in it and its shadow falls into the room below */}
<div ref={setLayer} data-ns-stage-layer="" className="pointer-events-none absolute inset-x-0 top-0 z-[60] [contain:layout]" style={{ bottom: SHADOW_ROOM }} />
{layer && (
<StageLayer value={layer}>
<ShortcutSheet key={use} open={open} onOpenChange={setOpen} groups={groups} description={line ? "Every key here works on this page; Find takes words or a key." : undefined} bindKeys={false} labels={{ tryIt: "" }} />
</StageLayer>
)}
</div>
);
}components/ui/notchset/shortcut-sheet.tsx
LevelOrganism: made of molecules or blocks.
Made ofDialog,Keyboard hint,Search field
Free, no account or key. One command for every shadcn style. With the @notchset registry added, @notchset/<name> works too.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
groups–
ShortcutGroup[]Required.
open–
booleanopen (controlled, with onOpenChange); leave it out and use defaultOpen for a sheet that keeps its own state
defaultOpen–
booleanopened on arrival when uncontrolled
onOpenChange–
(open: boolean) => voiddescription–
React.ReactNodeOne line under the title; says how to open the sheet when left out.
bindKeystrue
booleanBind ? (outside fields) and ⌘/ (anywhere) to open it. On by default; turn off where the host binds them.
labels–
Partial<ShortcutSheetLabels>its built-in words (SHORTCUT_SHEET_LABELS)
Three usesa CRM's keys · an editor's formatting keys · a mail app's keys
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.2.0 · 2026-11-17
Ships hit-area.ts (HIT_AREA), which it now uses.
v1.1.0 · 2026-11-17
Ships key-cap-parts.tsx (KEY_CAP_LABELS, KeyCaps, asCtrl, capsOf, hintProps, isApple, keyCap, keyCapTone, KeyCapLabels, KeyCapsProps, Shortcut), which it now uses. shortcut-sheet.tsx now exports RESERVED_CHORDS, SHORTCUT_RECORDER_LABELS, ShortcutRecorder, printChord, sayChord, ShortcutRecorderLabels, ShortcutRecorderProps, ShortcutRecorderRow.
v1.0.0 · 2026-11-09
Released free with the Notchset system.