Kbd

A component for displaying keyboard keys and shortcuts.

Installation

Install the component package, shared coss-svelte theme, and Bits UI peer.

npm install coss-svelte @coss-svelte/theme bits-ui

Usage

Import the Svelte component exports directly from the package.

import { Kbd, KbdGroup } from "coss-svelte";

Anatomy

  • Kbd
  • KbdGroup

API Reference

Kbd

A component for displaying keyboard keys and shortcuts.

children : Snippet<[]>

Inherits from Svelte <kbd> attributes.

KbdGroup

Groups related items inside the parent component.

children : Snippet<[]>

Inherits from Svelte <kbd> attributes.

Implementation Details

Status
Stable
Foundation
native
Category
Content & Display
Particles
1