SheetPresenter
Unofficial
Shows a popup element either in place or, on a phone, as a dismissible bottom sheet over a background.
Used by obsidian#Menu.presenter and by other popups that switch to a sheet on phones.
Import:
import type { SheetPresenter } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface SheetPresenterProperties
| Property | Type | Description | |
|---|---|---|---|
| bgEl | HTMLElement | Background element placed behind the sheet; clicking it dismisses the popup. | |
| containerEl | HTMLElement | The popup element being presented. | |
| isSheet | boolean | Whether the popup is, or would be, shown as a sheet: the current mode while shown, otherwise whether the device is a phone. | |
| isShown | boolean | Whether the popup is currently shown. | |
| isShownAsSheet | boolean | Whether the current showing is a sheet, decided on each SheetPresenter.show. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| hide(callback?) | void | Hide the popup, animating the sheet away first when it is shown as one. | |
| show(parentEl, onShowInPlace) | void | Show the popup in the given parent. |
Links to this page: