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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Événements émis par ce composant.

@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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic scrim

vue

Custom scrim color

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.