mirror of
https://github.com/huntabyte/shadcn-svelte.git
synced 2026-09-14 19:33:46 +08:00
7ff65b4892
Co-authored-by: Crush <crush@charm.land> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1.9 KiB
1.9 KiB
title, description, component, links
| title | description | component | links | ||
|---|---|---|---|---|---|
| Kbd | Used to display textual user input from keyboard. | true |
|
Installation
{#snippet cli()} {/snippet} {#snippet manual()}Copy and paste the following code into your project.
{#if viewerData} {/if} {/snippet}Usage
<script lang="ts">
import * as Kbd from "$lib/components/ui/kbd/index.js";
</script>
<Kbd.Root>B</Kbd.Root>
Examples
Group
Use the Kbd.Group component to group keyboard keys together.
Button
Use the Kbd.Root component inside a Button component to display a keyboard key inside a button.
Tooltip
You can use the Kbd.Root component inside a Tooltip component to display a tooltip with a keyboard key.
Input Group
You can use the Kbd.Root component inside a InputGroup.Addon component to display a keyboard key inside an input group.