Knit UI
GitHub

Playground

Loading playground…

false
false
Playground
<Burger
  aria-label="Toggle navigation"
  opened={false}
  size="md"
  disabled={false}
  transitionDuration={300}
  transitionTimingFunction="ease"
/>

Examples

Sizes

Full token size scale rendered side by side for quick comparison.

Loading example…

SizesSourceStorybook

Opened

The opened (×) state — the full token size scale to show the morph result.

Loading example…

OpenedSourceStorybook

Shadows

Elevation via the shared shadow ladder — inherited from Box, so every component accepts it; no shadow unless set.

Loading example…

ShadowsSourceStorybook

Controlled

Controlled toggle — click the burger to open and close it.

Loading example…

ControlledSourceStorybook

Disabled

Disabled state — interaction is suppressed and the button appears dimmed.

Loading example…

DisabledSourceStorybook

With Label

With a child label rendered alongside the icon.

Loading example…

With LabelSourceStorybook

Theme Accent

Theme accent — line color follows the active theme tokens.

Loading example…

Theme AccentSourceStorybook

Slow Transition

Slow transition — makes the morph animation visible for demonstration.

Loading example…

Slow TransitionSourceStorybook

Styles

Per-slot styles targets individual parts — here the line bars and text label.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
aria-labelstring | undefinedToggle navigationAccessible label for the button.
childrenReactNodeContent rendered after the burger icon.
colorOpaqueColorValue | GetThemeValueForKey<"backgroundColor"> | undefined'$color12'Color of the burger lines. Theme color token or any CSS color.
disabled systemboolean | undefinedfalseDisables interaction and dims the button.
lineSizestring | number | undefinedExplicit line thickness in px — derived from size by default.
openedboolean | undefinedfalseWhen true the burger morphs into an × (close) icon.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size systemnumber | "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
'md'Controls the width and height of the burger icon.
styles systemSlotStyles<BurgerStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefinedApplies a theme to this element
transitionDurationnumber | undefined300Morph animation duration in milliseconds.
transitionTimingFunctionstring | undefined
ease · linear · ease-in · ease-out · cubic-bezier(0.34,1.56,0.64,1)
'ease'CSS timing function for the morph animation.

Style slots

Every part of Burger can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
iconstyles={{ icon: { … } }}
linestyles={{ line: { … } }}
rootstyles={{ root: { … } }}
textstyles={{ text: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 496 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.