Skip to content

obsidian/components/plugin-notice-component

Component that manages displaying notices to the user.

ClassDescription
PluginNoticeComponentManages showing plugin notices. By default a new notice hides the previous one, so only the latest message is on screen; PluginNoticeComponentShowNoticeOptions.mode chooses otherwise — see PluginNoticeMode.
InterfaceDescription
PluginNoticeCloseClickEventThe event passed to PluginNoticeComponentShowNoticeOptions.onCloseClick when the notice’s close (X) button is clicked.
PluginNoticeComponentDelayedNoticeA handle to a delayed notice created by PluginNoticeComponent.showNoticeAfterDelay. It is a Disposable (so it can be used with using) that also lets the content be updated while the notice is shown.
PluginNoticeComponentShowNoticeAfterDelayParamsParameters for PluginNoticeComponent.showNoticeAfterDelay.
PluginNoticeComponentShowNoticeOptionsOptions for PluginNoticeComponent.showNotice.
PluginNoticeHideInfoDescribes why a notice was hidden, passed to PluginNoticeComponentShowNoticeOptions.onHide.
EnumDescription
PluginNoticeModeHow a new notice relates to the plugin’s current notice — the one occupying the single per-plugin slot this component keeps. Raw new Notice(...) calls always pile up, which is rarely what a plugin wants: usually only the latest message matters. So the slot exists, and this chooses what a new message does with it.