Knit UI
GitHub

Playground

Loading playground…

false
false
Playground
<ActionIcon
  aria-label="favourite"
  variant="filled"
  size="md"
  disabled={false}
  loading={false}
>
  <IconStar />
</ActionIcon>

Examples

Variants

Every visual variant side by side, captioned.

Loading example…

VariantsSourceStorybook

Sizes

The seven token sizes, from xxs to xxl — the icon auto-scales to each.

Loading example…

SizesSourceStorybook

Radius

radius rounds the square — from a soft xs to a full circle.

Loading example…

RadiusSourceStorybook

Shadows

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

Loading example…

ShadowsSourceStorybook

Loading

Loading state — the icon is replaced by a spinner and interaction is blocked.

Loading example…

LoadingSourceStorybook

Disabled

Disabled state — reduced opacity and pointer events off.

Loading example…

DisabledSourceStorybook

Themed

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

Loading example…

ThemedSourceStorybook

Toolbar

A realistic toolbar — distinct icons, a subtle variant, and a flush group.

Loading example…

ToolbarSourceStorybook

Group

ActionIcon.Group attaches icons flush; orientation flips the axis.

Loading example…

GroupSourceStorybook

Group With Section

ActionIcon.GroupSection is a non-interactive segment inside a group.

Loading example…

Group With SectionSourceStorybook

Matrix

Full variant × size matrix for visual regression.

Loading example…

MatrixSourceStorybook

Styles

Per-slot styles targets individual parts. The loader slot recolors the spinner; the icon slot recolors string-glyph children (node icons instead inherit color from the control via the icon context).

Loading example…

StylesSourceStorybook

Gradient

variant="gradient" fills the square with a linear gradient. With no gradient prop it falls back to the theme ramp; otherwise pass a two-color shorthand, $colorN tokens, or a multi-step stops array. The icon auto-colors white on the gradient.

Loading example…

GradientSourceStorybook

Gradient Presets

A set of curated gradient presets — handy starting points.

Loading example…

Gradient PresetsSourceStorybook

Gradient Themed

variant="gradient" with no gradient prop derives the gradient from each theme.

Loading example…

Gradient ThemedSourceStorybook

Gradient Sizes

One gradient (Sunset) across the full size scale.

Loading example…

Gradient SizesSourceStorybook

Props

PropTypeDefaultDescription
disabled systemboolean | undefinedfalse
gradient systemGradientValue | undefinedGradient fill for variant='gradient' — { from, to, deg } or { stops, deg }.
loaderPropsPartial<LoaderProps> | undefined
loadingboolean | undefinedfalseIf set, a `Loader` is shown instead of the icon and interaction is blocked.
radius systemstring | number | undefinedTheme radius token (e.g. `$sm`) or any CSS value.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size systemstring | number | undefined
xxs · xs · sm · md · lg · xl · xxl
mdControls the square width/height and radius.
styles systemSlotStyles<ActionIconStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefined
unset · blue · red · green · yellow · pink
Active theme accent — recolors the icon via the palette ramp.
variant system"light" | "outline" | "white" | "transparent" | "default" | "filled" | "subtle" | "gradient" | undefined
filled · light · outline · subtle · transparent · white · default · gradient
filledVisual variant — how the theme color ramp is applied.

Style slots

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

SlotUsage
iconstyles={{ icon: { … } }}
loaderstyles={{ loader: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

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