Default (semi-transparent)

Content behind overlay

<div style="position:relative;height:120px">
  <p>Content behind overlay</p>
  <Overlay backgroundOpacity={0.5} />
</div>

Custom color and opacity

Hidden content

<Overlay color="var(--dv-color-violet-filled)" backgroundOpacity={0.7} />

With centered content

Loading…

<div style="position:relative;height:120px">
  <Overlay backgroundOpacity={0.6} center>
    <Text c="white" fw={700}>Loading…</Text>
  </Overlay>
</div>

With blur

Blurred overlay

<Overlay blur={4} backgroundOpacity={0.2} />

Props

PropTypeDefaultDescription
colorstring—Background fill color — any CSS color value
backgroundOpacitynumber—Opacity of the background fill (0–1)
blurnumber|string—Backdrop blur in pixels or CSS blur value
fixedboolean—Positions overlay fixed to the viewport
zIndexnumber—CSS z-index stacking order
centerboolean—Centers child content with flexbox
classstring—Additional CSS class names
styleobject—Inline styles
childrenReactNode—Content rendered inside the overlay