Shortcut

A small badge for displaying keyboard shortcuts inline.

K

Press K to trigger

Installation

Copy the command below and run it in your terminal.

bunx @sivir/ui add shortcut

Usage

Import Shortcut and pass a keyboard shortcut string:

import Shortcut from '$lib/sivir/components/shortcut';

<Shortcut shortcut="cmd+K" />
<Shortcut shortcut="shift+/" />

Examples

Shortcut in various compositions and contexts.

Basic

K

With modifiers

K /

In context