@antadesign/anta
    Preparing search index...

    Function BannerUnreviewed

    • <Banner> — a full-width, dismissible message strip. message, children, and actions form a row at the inline start by default; align="center" centers it.

      A pure, stateless pass-through to <a-banner>: the element owns dismissal and visibility, so the wrapper holds no state and grabs no ref — it maps props to attributes (safe wherever the host DOM is reconciled, incl. off the UI thread).

      Uncontrolled (defaultDismissed): the element owns visibility and the ✕ self-dismisses. Controlled (dismissed + onDismiss): the wrapper emits state="open"|"closed"; the element treats the attribute as the source of truth and the ✕ only requests dismissal. The element uses Anta's shared open/closed state contract under the hood — the wrapper presents it as the banner-natural dismissed (closed = dismissed). See STATEFUL-COMPONENTS.md.

      Requires @antadesign/anta/elements to be imported (client-side only) to register the underlying custom element.

      Parameters

      Returns any

      <Banner tone="info" message="A new release is available." actions={<Button size="small" label="Update" />} />
      
      const [hidden, setHidden] = useState(false)
      <Banner message="Saved." dismissed={hidden} onDismiss={() => setHidden(true)} />