BrowseSheet

Overlays

Glass Sheet

A glass panel that slides in from any edge; pull a bottom sheet down to close it.

Preview

Glass sheet

Drag the handle down or press Escape to close.

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassSheet, GlassSheetContent } from 'ngx-vitreo';

@Component({
  imports: [GlassSheet, GlassSheetContent],
  // ...
})

Usage

Usage

<glass-sheet [(open)]="open">
  <button glassButton glassSheetTrigger>Open sheet</button>
  <glass-sheet-content side="bottom">
    <h2 glassSheetTitle>Glass sheet</h2>
    <p glassSheetDescription>Drag the handle down or press Escape to close.</p>
  </glass-sheet-content>
</glass-sheet>

API reference

GlassSheet

<glass-sheet>

InputTypeDefaultDescription
open / defaultOpenboolean (model)falseControlled with [(open)], or uncontrolled from defaultOpen.
(openChange)booleanNoneEmits when it opens or closes.
modalbooleantrueTraps focus and makes the page behind inert.

GlassSheetContent

<glass-sheet-content>

InputTypeDefaultDescription
side'top' | 'right' | 'bottom' | 'left''bottom'Edge the sheet slides in from. Only bottom sheets get a drag handle that dismisses them.
closeLabelstring'Close sheet'Accessible name of the built-in close button.
(openAutoFocus) / (closeAutoFocus)EventNoneFocus moving in on open and back to the trigger on close. preventDefault() keeps it where it is.
(escapeKeyDown) / (pointerDownOutside) / (interactOutside)KeyboardEvent / CustomEventNoneWays the content is about to close. preventDefault() keeps it open.
thicknessnumber thickness preference Glass thickness as a multiple of regular (1); thicker glass bends the backdrop further at the rim.
classstringNoneThe element is the glass panel, so its classes style the panel.

Trigger, Close, Title, Description

[glassSheetTrigger], [glassSheetClose], [glassSheetTitle], [glassSheetDescription]

InputTypeDefaultDescription
——NoneThe dialog parts under sheet names.