Knit UI
GitHub

Playground

Loading playground…

Playground
<Kbd
  size="sm"
>
  Ctrl
</Kbd>

Examples

Sizes

The seven sizes side by side, from xxs to xxl.

Loading example…

SizesSourceStorybook

Common Keys

Common single-key labels shown at the default size.

Loading example…

Common KeysSourceStorybook

Shortcut

Keyboard shortcuts composed of multiple Kbd keys separated by a plus sign.

Loading example…

ShortcutSourceStorybook

Themed

The palette ramp follows the active theme — same component, different accent.

Loading example…

ThemedSourceStorybook

Special Keys

Larger key labels such as function keys and navigation keys.

Loading example…

Special KeysSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefinedSpecifies the disabled state of the text view for testing purposes.
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
smScales the keycap — font, padding (height), and corner radius.
theme systemThemeName | null | undefined
unset · blue · red · green · yellow · pink · gray
Active theme accent — recolors the key surface and border via the palette ramp.
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiTextElement> | undefined

Plus 507 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.