Knit UI
GitHub

Playground

Loading playground…

Playground
<BackgroundImage
  src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&q=80"
  resizeMode="cover"
  width={400}
  height={200}
/>

Examples

With Overlay

Default cover fit with a text overlay centered in the frame.

Loading example…

With OverlaySourceStorybook

Resize Modes

All five resize modes side by side — shows how the image fills each frame.

Loading example…

Resize ModesSourceStorybook

Rounded

Rounded corners via the radius token — clipped by overflow hidden.

Loading example…

RoundedSourceStorybook

Radius Scale

Sweep of all radius values showing how corners are clipped.

Loading example…

Radius ScaleSourceStorybook

Shadows

Sweep of all shadow levels showing the elevation ladder behind the image frame.

Loading example…

ShadowsSourceStorybook

Fixed Size

Fixed dimensions — explicit width and height constrain the image frame.

Loading example…

Fixed SizeSourceStorybook

Full Width Banner

Full-width banner — stretches to fill the container width.

Loading example…

Full Width BannerSourceStorybook

Styles

Per-slot styles targets individual parts — here the root frame and backing image.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
src requiredstringhttps://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&q=80Image URL rendered behind the content.
disabled systemboolean | undefined
fitImageObjectFit | undefined'cover'How the image fills the frame — a CSS `object-fit` value forwarded to the inner `Image`'s `fit`.
imagePropsPartial<ImageProps> | undefinedProps spread onto the layered backing `<Image>`, making the previously opaque inner image reachable (e.g. `transition`, `placeholder`, `radius`). Engine-owned props (`src`/`fit`/`objectPosition`/`resizeMode`/positioning) still win. Alias for `styles.image`.
objectPositionImageObjectPosition | undefinedHow the image is aligned within the frame when it overflows — a CSS `object-position` value (keyword, `"x y"`, or `{ top, left, … }`) forwarded to the inner `Image`. Honored on web and native alike.
radius systemstring | number | undefined
unset · xs · sm · md · lg · xl
Corner radius token — clips the image to the frame.
resizeModeBackgroundImageResizeMode | undefined
cover · contain · stretch · center · repeat
coverHow the image fills the frame.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
unset · xs · sm · md · lg · xl
Elevation — drop shadow from the shared ladder.
styles systemSlotStyles<BackgroundImageStyles> | undefinedPer-slot style sugar — props spread onto the matching part (`root`/`image`).
theme systemThemeName | null | undefinedApplies a theme to this element

Style slots

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

SlotUsage
imagestyles={{ image: { … } }}
rootstyles={{ root: { … } }}
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.