Skip to content

Shortcuts

Open .md
Live preview

Loading example…

A short list of quick links or actions, flush to its container. Items go in ShortcutsItem.

import { Shortcuts } from "@jcsoftdev/ui/containers";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/shortcuts.

<Shortcuts aria-label="Quick links">
<>
<ShortcutsItem href="#students" icon={<Users />} kbd="G S">
Students
</ShortcutsItem>
<ShortcutsItem href="#calendar" icon={<Calendar />} count={4}>
Calendar
</ShortcutsItem>
</>
</Shortcuts>

This component declares no props of its own.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/containers/shortcuts/shortcuts.tsx