Knit UI
GitHub

Playground

Loading playground…

false
Playground
<UnstyledButton
  disabled={false}
>
  Press me
</UnstyledButton>

Examples

Shadows

The shadow elevation prop, inherited from Box, across all token levels.

Loading example…

ShadowsSourceStorybook

Disabled

Disabled state — opacity is reduced and pointer events are turned off.

Loading example…

DisabledSourceStorybook

Custom Styled

Custom styled content — UnstyledButton intentionally carries no visual style so you bring your own.

Loading example…

Custom StyledSourceStorybook

With Icon

With an icon — since UnstyledButton is a Box, layout children freely.

Loading example…

With IconSourceStorybook

Grouped

Multiple unstyled buttons in a row, demonstrating composition as a toolbar.

Loading example…

GroupedSourceStorybook

Press Counter

Controlled press counter — demonstrates that onPress fires and state updates correctly.

Loading example…

Press CounterSourceStorybook

Press styles inside a pressable

On Android, a press: style on a view inside a pressable makes that view take the touch, so the outer onPress never fires. Web keeps working, so this is easy to miss.

Put the press: style on the pressable itself. If an inner view has to change on press, drive it from state in the pressable's onPressIn and onPressOut.

Props

PropTypeDefaultDescription
disabled systemboolean | undefinedfalseReduces opacity and disables pointer events.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined——
theme systemThemeName | null | undefined—Applies a theme to this element

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

Edit this page on GitHub