Skip to content
SkillCodex
Menu

Banner

Banner

A prominent, persistent message spanning a page region to communicate a condition that affects broad page use.

Try the component
Context, sources and actions
Sources and revision
Updated
Version
v1.0.26 · r2
Sources
5 sources
Status
Published
Read the sources

You may have searched for: a message across the top of the pagewarn everyone about scheduled maintenancea full-width announcement above the content

All phrasings
Save and share

Recognize

Inform the user

Try it

Is the message transient, persistent in context, or global to the page?

Banner

Shared trial context

A workspace reports a state change and must place the message according to its scope, urgency, and persistence.

Banner

Mission

Banner

Read the announcement, open service details, then navigate to another project and verify the condition remains visible.

Maintenance is planned Sunday from 08:00 to 09:00. Local drafts will remain available.

View details

Project Alpha

Your workspace remains available.

Maintenance details

Read access remains available during maintenance.

Live result

The maintenance announcement precedes the main content.

Step 1 of 3

Try

Try the component. Your live result appears just above. Move on at your own pace.

Behavior and edge case
What to observe
The wide named section appears before main content with the maintenance time and one details link.
Edge case
At narrow widths the message wraps without covering navigation, and the details link remains comfortably operable by touch.

What this example shows

Banner covers a broad page condition; Inline alert belongs beside one task, while Toast is a transient event update.

Which fits your need?

Banner

Announcing scheduled maintenance affecting the page

Toast

Confirming a low-risk background result

Which component will you use here?
Difference and sources

Banner covers a broad page condition; Inline alert belongs beside one task, while Toast is a transient event update.

Read the sources

    Parts of the specimen

    Select a numbered marker on the schematic, or use the list below, to see its role. The schematic shows the concept's representative state.

    Surface

    The visible container that holds the concept's content.

    Position in the atlas

    Relationship map

    Locate the chapter, neighboring concepts, and the next useful decision.

    • Chapter

      Inform the user

      Banner belongs to this comparison group.

    • Do not confuse

      Toast

      Choose Banner if the condition persists and the user must keep it in mind while using the page. Choose Toast if you confirm a low-risk background result that needs no action.

      Compare this pair
    • Do not confuse

      Inline alert

      Choose Banner if the message concerns the whole page or session, such as scheduled maintenance. Choose Inline alert if the message explains a problem in one form, field, or upload, right where it happened.

      Compare this pair
    • Next step

      Compare the concepts in the chapter before choosing an implementation.

      Open the chapter

    In your own words

    Understand

    What people describe

    Documented aliases: announcement bar, site notice, page notice

    • a message across the top of the page
    • warn everyone about scheduled maintenance
    • a full-width announcement above the content
    • show that the whole service is degraded
    • a persistent notice for all users
    • put a site-wide update in a top bar

    Choose

    Use it when

    • Announcing scheduled maintenance affecting the page
    • Communicating a service-wide degraded state

    Avoid it when

    • Only one field or local task is affected
    • The message is a routine low-risk confirmation

    Compare

    Compare similar concepts

    Verification checklist

    Try these actions in the lab, then check the same behaviours in your agent’s result. Adapt the example names to your interface.

    1. 1. Do this

      Display the page-wide notice and read the affected area and available next action.

      Expected result

      The notice explains a condition affecting the page or service, with a clear recovery or information link when needed.

    2. 2. Do this

      Continue to another section while the announced condition still applies.

      Expected result

      The notice stays available where it is relevant and does not disappear like a temporary confirmation.

    3. 3. Do this

      Read the banner in a narrow window and reach its link or button with Tab.

      Expected result

      Text wraps without hiding navigation, the action is reachable, and the banner does not take focus merely by appearing.

    Full contract
    1. 1The message truly affects a broad page region
    2. 2The container is a named section rather than misusing role banner
    3. 3Navigation and focus remain usable at narrow widths
    4. 4Dismissal never hides an unresolved critical condition

    Understand → Recognize → Choose → Compare

    Pack for your agent

    Pre-written instructions to paste into your agent. Copying executes nothing.

    Implement correctly

    Build Banner without breaking its behavior

    # Implement Banner in your agent
    
    ## Objective
    Implement Banner for this verified behavior: A prominent, persistent message spanning a page region to communicate a condition that affects broad page use.
    
    ## Prerequisites
    - Inspect the repository, design system, and existing tests first.
    - Preserve unrelated changes and keep the file scope bounded.
    - Confirm that Banner matches the need before writing code.
    
    ## Required behavior
    - The message remains in context until the condition changes or the user deliberately dismisses it.
    - A live region announces new status only when the update is important and not already focused.
    
    ## States to cover
    - Maintenance announcement inactive
    - Maintenance announcement active
    
    ## Accessibility
    - ARIA role: section | aside
    - The primary control or named region for Banner has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    - The banner appears before main content without stealing focus; links receive the same visible focus as the rest of the page.
    - A close control exists only for noncritical notices, and dismissal persistence expires when the message changes materially.
    - A newly introduced urgent condition may be announced once, while persistent static content remains discoverable without repeated live announcements.
    - Tab reaches banner links in document order
    - Enter activates the details or dismiss action
    
    ## When not to use
    - Only one field or local task is affected
    - The message is a routine low-risk confirmation
    
    ## Acceptance criteria
    - The message truly affects a broad page region
    - The container is a named section rather than misusing role banner
    - Navigation and focus remain usable at narrow widths
    - Dismissal never hides an unresolved critical condition
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • Web platform
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The need is tied to canonical behavior before any technical choice.
    • States, accessibility, and non-goals prevent a merely visual implementation.
    • Acceptance criteria and the output format make verification observable.

    Try next

    Verify Banner on a real journey

    # Verify Banner after implementation
    
    ## Objective
    Audit the Banner implementation against its behavior, states, and accessibility requirements without changing it automatically.
    
    ## Checks
    - Replay the smallest representative journey.
    - Check keyboard behavior, focus, accessible name, and announcements.
    - Tie each gap to a specific acceptance criterion.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:2d6bd385de9ce1245263a77330b0e67cdc3d2b6399839c59e629a5946d9cc7a5

    Diagnose a problem

    Find and fix the Banner defect

    # Debug Banner in your agent
    
    ## Observed symptom
    [DESCRIBE THE SYMPTOM HERE]
    
    ## Observable checks
    - Reproduce the issue with the smallest relevant journey.
    - Compare behavior with the documented states and transitions for Banner.
    - Verify keyboard behavior, focus, accessible name, and announcements.
    
    ## Possible causes
    - The chosen primitive does not match the expected behavior.
    - A state, transition, or focus return is missing.
    - A neighboring component captures an event or hides an accessible signal.
    
    ## Bounded corrections
    - Fix the reproduced cause without recreating neighboring components.
    - Preserve the public contract and add a focused regression test.
    - Do not install dependencies or change remote state without authorization.
    
    ## Final verification
    - The message truly affects a broad page region
    - The container is a named section rather than misusing role banner
    - Navigation and focus remain usable at narrow widths
    - Dismissal never hides an unresolved critical condition
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • Web platform
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The explicit symptom prevents starting from an assumed fix.
    • Checks separate behavior, accessibility, and neighboring interference.
    • The fix stays bounded and must produce regression evidence.

    Try next

    Lock in the Banner fix

    # Prevent the Banner regression
    
    ## Objective
    Turn the reproduced cause into a focused regression test and compare Banner with neighboring concepts before widening the fix.
    
    ## Checks
    - Prove that the test fails before the fix.
    - Prove that it passes after the bounded fix.
    - Verify that no neighboring component changed behavior.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:e3f4d6102c940b372ffa051d0bb59105e423a54900a78758e25b8478e994bff6

    Full entry, saving and provenance

    Pre-written instruction by SkillCodex — your request is neither sent nor used to adapt this text; no content is generated, and copying executes nothing.

    Pack digest: sha256:0e7ae76ab92bbd0885213c566f9e4d90632de36e665cbd5c80035fb277c56a8a

    In code

    TechnologyPrimitiveVersionCaveat
    Web platform

    section or aside with an accessible name

    NativeARIA banner denotes a site header; a product announcement normally uses a named section or aside instead.

    Technical details

    Behaviors

    • Remain until resolved

      The message remains in context until the condition changes or the user deliberately dismisses it.

    • Announce meaningful changes

      A live region announces new status only when the update is important and not already focused.

    States

    • Maintenance announcement inactive

      Maintenance announcement inactive

    • Maintenance announcement active

      Maintenance announcement active

    State transitions

    • Maintenance announcement inactive → Maintenance announcement active

      A scheduled workspace-wide maintenance window is published with its time and details link.

    • Maintenance announcement active → Maintenance announcement inactive

      The announced maintenance window ends or is withdrawn by its authoritative source.

    Test scenarios

    Context
    A workspace announces a two-hour read-only maintenance window affecting every project.
    Mission
    Read the announcement, open service details, then navigate to another project and verify the condition remains visible.
    Primary state
    The wide named section appears before main content with the maintenance time and one details link.
    Edge case
    At narrow widths the message wraps without covering navigation, and the details link remains comfortably operable by touch.

    Visual signals

    • Wide region before main content
    • Concise message with optional action
    • Prominence consistent with page-wide impact

    Behavioral signals

    • Persists across affected views
    • Does not trap focus
    • Dismissal preference is remembered only when the condition allows

    Accessibility

    Role
    section | aside
    Accessible name
    The primary control or named region for Banner has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    Focus
    The banner appears before main content without stealing focus; links receive the same visible focus as the rest of the page.
    Dismissal
    A close control exists only for noncritical notices, and dismissal persistence expires when the message changes materially.
    Scroll
    Showing or updating the message preserves the reader's scroll position unless focus is intentionally moved to a blocking error.
    Announcement
    A newly introduced urgent condition may be announced once, while persistent static content remains discoverable without repeated live announcements.
    Keyboard
    • Tab reaches banner links in document order
    • Enter activates the details or dismiss action

    Bindings

    Open the HTML, ARIA, Radix, and shadcn matrix
    • section or aside with an accessible name

      implementationKind
      custom
      nativeElement
      section or aside with an accessible name
      ariaPattern
      named region
      radixPrimitive
      Not applicable
      shadcnRecipe
      Not applicable
      runtimeDependency
      Not applicable
      packageName
      Not applicable
      exportName
      Not applicable
      exactVersion
      Not applicable
      status
      exception
      sourceId
      source-ui-wai-aria-roles
      deprecationStatus
      active
      replacement
      Not applicable
      validFrom
      Not applicable
      validUntil
      Not applicable

      Equivalence caveat: ARIA banner denotes a site header; a product announcement normally uses a named section or aside instead.

      Verify binding source

    Sources

    • WAI-ARIA 1.2: Roles Model
      sourceId
      source-ui-wai-aria-roles
      kind
      standard
      canonicalUrl
      https://www.w3.org/TR/wai-aria-1.2/#roles
      publisher
      W3C WAI
      sourceRevision
      W3C-REC-wai-aria-1.2-20230606
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:c0fea16fc747779569ab754d2d25bca3e2b7e8a673b8ef5362aeb9ebc73a4849
      status
      verified

      Claim covered: Banner: normative ARIA role definitions and constraints for the stated accessible role.

    • WCAG 2.2: Status Messages
      sourceId
      source-ui-wcag-understanding-status-messages
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-02T10:07:49Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:cf2a8c16b20c1a94164c9a37e2b3f15d9a7d3f47d88385d47432d6a29655609e
      status
      verified

      Claim covered: Banner: informative WCAG guidance for status messages announced without moving focus.

    • WAI-ARIA 1.2: Live Region Attributes
      sourceId
      source-ui-wai-aria-live-regions
      kind
      standard
      canonicalUrl
      https://www.w3.org/TR/wai-aria-1.2/#attrs_liveregions
      publisher
      W3C WAI
      sourceRevision
      W3C-REC-wai-aria-1.2-20230606
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:c0fea16fc747779569ab754d2d25bca3e2b7e8a673b8ef5362aeb9ebc73a4849
      status
      verified

      Claim covered: Banner: normative live-region properties for status announcement behavior.

    • WHATWG HTML: The a element
      sourceId
      source-ui-html-link
      kind
      standard
      canonicalUrl
      https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element
      publisher
      WHATWG
      sourceRevision
      http-last-modified:2026-07-19T13:52:46Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:fe0a3d4315ccdf4f171cbb0c61ee6188b0db2dfe13a7c7f1f04f6b37528661f6
      status
      verified

      Claim covered: Banner: normative native semantics, states, attributes, and browser behavior for a[href].

    • WHATWG HTML: The button element
      sourceId
      source-ui-html-button
      kind
      standard
      canonicalUrl
      https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element
      publisher
      WHATWG
      sourceRevision
      http-last-modified:2026-07-19T13:52:46Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:418a8f9ce1e8690c6d458121120b0b3b7cd907aa92b2101b85f82f7e02d5ac2f
      status
      verified

      Claim covered: Banner: normative native semantics, states, attributes, and browser behavior for button.