Kbd
Kbd is part of the Layout and content group. Inline keyboard shortcut styling.
Installation
Section titled “Installation”npx bambiui add kbd --framework reactnpx bambiui add kbd --framework solidnpx bambiui add kbd --framework sveltenpx bambiui add kbd --framework vueimport { Kbd } from "@/components/ui/kbd";
export function Example() { return <Kbd />;}import { Kbd } from "~/components/ui/kbd";
export function Example() { return <Kbd />;}<script lang="ts"> import { Kbd } from "$lib/components/ui/kbd";</script>
<Kbd /><script setup lang="ts">import { Kbd } from "@/components/ui/kbd";</script>
<template> <Kbd /></template>Preview
Section titled “Preview”
Kbd preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use in docs, menus, and shortcut hints.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Kbd. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”KbdTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-background--bambi-border--bambi-foreground