UNPKG

@accelint/design-toolkit

Version:

An open-source component library to serve as part of the entire ecosystem of UX for Accelint.

41 lines (38 loc) 1.19 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { HotkeyProps } from './types.js'; import 'react'; import 'tailwind-variants'; import './styles.js'; /** * Hotkey - A visual representation of keyboard shortcuts and key combinations * * Displays keyboard keys and shortcuts in a consistent, accessible format. * Perfect for documentation, help systems, or UI elements that need to show * keyboard shortcuts. Supports multiple visual styles including outlined keys, * flat presentation, and icon-specific formatting. * * @example * // Basic hotkey display * <Hotkey>Ctrl</Hotkey> * * @example * // Hotkey combination with different variants * <HotkeySet> * <Hotkey variant="outline">Cmd</Hotkey> * <span>+</span> * <Hotkey variant="outline">K</Hotkey> * </HotkeySet> * * @example * // Flat style for inline text * <p>Press <Hotkey variant="flat">Enter</Hotkey> to submit</p> * * @example * // Icon variant for special keys * <HotkeySet> * <Hotkey variant="icon">⌘</Hotkey> * <Hotkey>Space</Hotkey> * </HotkeySet> */ declare function Hotkey({ ref, children, ...props }: HotkeyProps): react_jsx_runtime.JSX.Element; export { Hotkey };