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
colorstringBackground fill color — any CSS color value
backgroundOpacitynumberOpacity of the background fill (0–1)
blurnumber|stringBackdrop blur in pixels or CSS blur value
fixedbooleanPositions overlay fixed to the viewport
zIndexnumberCSS z-index stacking order
centerbooleanCenters child content with flexbox
classstringAdditional CSS class names
styleobjectInline styles
childrenReactNodeContent rendered inside the overlay