OverlayScrim

Layout & Structure
stable

Full-viewport backdrop that dims content behind a dialog, drawer or menu. Supports click-to-close and custom background color.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamOverlayScrimSchematic of the OverlayScrim component — a single fixed-position overlay element. position: fixed · inset: 0 · opacity: 0.32 1 origam-scrim
Anatomy of <origam-overlay-scrim> — a single div.origam-scrim positioned fixed with inset: 0. Wrapped in an <origam-transition> (OrigamFade by default).
1.origam-scrim
Root element. position: fixed; inset: 0; opacity: 0.32. Conditionally rendered via v-if="active" wrapped in <origam-transition>. Has aria-hidden="true".

API

Props

All props accepted by this component, with their type, default value and description.

active
boolean
false
Shows or hides the scrim. When false, the element is removed from the DOM (v-if).
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root.
disabled
boolean
Transition component or config applied around the scrim. Defaults to OrigamFade.
scrim
boolean | string
true
When a string, used as the background-color via useBackgroundColor. When boolean, toggles the scrim visibility. False disables the scrim.

API

Emits

Events emitted by this component.

@mouseenter
MouseEvent
Fired when the pointer enters the scrim surface.
@mouseleave
MouseEvent
Fired when the pointer leaves the scrim surface.
@click
MouseEvent
Fired when the scrim is clicked. Typically used to close the parent overlay.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Scrim background color. Aliased to color.overlay.scrim. Overridden inline when scrim prop is a color string.
Opacity of the backdrop. 0.32 matches Material Design spec.
Pointer event handling. Set to none to make the scrim click-through.
Duration of the opacity transition on enter/leave.
Easing function for the opacity transition.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Keyboard interactions

Keyboard interactions
KeyAction
EscapeConventionally closes the parent overlay (handled by the parent, not the scrim itself).

Notes

  • The scrim element always carries aria-hidden="true" — it is purely decorative. Screen readers skip it entirely.
  • Click events are forwarded to the parent overlay which is responsible for closing and restoring focus.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__overlay---scrim)
Scrim background. References color.overlay.scrim semantic token.
number
var(--origam-opacity---32)
Default opacity (0.32).
duration
var(--origam-motion__duration---medium)
Duration of the opacity fade animation.
other
fixed
Positioning strategy — always fixed to cover the viewport.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic scrim

vue

Custom scrim color

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.