Skip to content

App

The host container for imperative APIs such as message / notification / loadingBar. When an app container exists, messages mount inside it (instead of document.body); works well with config-provider.

Basic usage

Wrapping content with <oas-app> makes imperative messages mount inside the app container.

Messages in the App container

Success messageError messageInfo messageNotificationLoading barClear messages

Working with ConfigProvider

app can be nested inside a config-provider to receive both the injected locale / size / theme and the message context.

ConfigProvider + App

Message (en)

API

Slots

NameDescription
default
  • When an app container exists, the message stacks of imperative APIs like message / notification / loadingBar mount into the nearest app container.
  • Without an app container, behavior is unchanged and messages mount to document.body.
  • Nearest wins: the app container registered later (inner) takes precedence.