Knit UI
GitHub

Playground

Loading playground…

false
false
Playground
<Overlay
  backgroundColor="#000"
  backgroundOpacity={0.6}
  fixed={false}
  center={false}
  zIndex={200}
/>

Examples

Default

Default scrim at 60 % black opacity — covers its positioned parent completely.

Loading example…

DefaultSourceStorybook

Centered

center prop flex-centers children inside the scrim — ideal for a loading spinner or message.

Loading example…

CenteredSourceStorybook

Light Wash

Light wash over a white or bright surface — white scrim at low opacity.

Loading example…

Light WashSourceStorybook

Shadows

Each elevation of the inherited shadow prop applied to the scrim frame.

Loading example…

ShadowsSourceStorybook

Colored Tint

Colour-tinted scrim — a branded accent wash rather than neutral black.

Loading example…

Colored TintSourceStorybook

Gradient

Gradient scrim — CSS gradient replaces the flat color wash.

Loading example…

GradientSourceStorybook

Blur Scrim

Blur effect — backdrop-filter blurs content behind the scrim (web only).

Loading example…

Blur ScrimSourceStorybook

With Radius

Radius — rounded corners clip the scrim to match a card or panel.

Loading example…

With RadiusSourceStorybook

Trigger

Controlled visibility — click the button to toggle the overlay on/off.

Loading example…

TriggerSourceStorybook

Props

PropTypeDefaultDescription
backgroundColorOpaqueColorValue | GetThemeValueForKey<"backgroundColor"> | undefined"#000"Scrim base color (hex). Ignored when `gradient` is set.
backgroundOpacitynumber | undefined0.6Opacity of the scrim color, 0–1. Ignored when `gradient` is set.
blurstring | number | undefined0Web-only backdrop blur in px (`backdrop-filter`). No-op on native.
disabled systemboolean | undefined
fixedboolean | undefinedfalseWhen true, positions relative to the viewport (`fixed`) instead of the parent (`absolute`).
gradient systemstring | undefinedWeb-only CSS gradient string. Overrides `backgroundColor`/`backgroundOpacity` when set.
radius systemstring | number | undefined
unset · xs · sm · md · lg · xl · full
Border radius token applied to the scrim frame.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
theme systemThemeName | null | undefinedApplies a theme to this element
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.