For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/app.md.
v0.0.57
  • English
  • App

    Config@rockshin/tao-ui

    Provides scoped message, notification and modal instances with application context.

    When to use

    Wrap the consuming subtree with App, then call App.useApp() inside a descendant. Put TaoProvider and any custom context providers outside App so feedback content inherits them. Each example has an isolated preview.

    Examples

    Scoped messages

    The hook must run below App. Each instance owns its messages and can destroy only its own notices.

    390 × 640
    TSX

    Keyed updates and close promises

    A message result is both a close function and a thenable. Reusing key updates the existing message.

    390 × 640
    TSX

    Notifications with actions and progress

    duration is measured in seconds. showProgress visualizes the auto-close timer; hovering pauses it by default.

    390 × 640
    TSX

    Await a confirmation

    The result resolves to true for confirmation and false for cancellation. This demo changes local state only.

    390 × 640
    TSX

    Async confirmation and retry

    Returning a promise keeps the action busy. Rejection keeps the modal open. This local simulation deliberately fails once, then succeeds.

    390 × 640
    TSX

    Update and destroy a modal

    The returned handle updates content or closes the dialog. A custom footer can retain the supplied OkBtn and CancelBtn.

    390 × 640
    TSX

    Theme, locale and custom context

    Feedback portals retain provider tokens and React context. Locale supplies default confirmation and close labels.

    390 × 640
    TSX

    Independent scopes and custom roots

    Two App instances keep separate message stores. component changes the wrapper element; component= omits only that wrapper.

    390 × 640
    TSX

    API

    App

    PropertyDescriptionTypeDefault Value
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-