Skip to content
SkillCodex
Menu

Popover

Popover

A small contextual surface opened deliberately to show supporting content or controls without making the whole page modal.

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 small panel when I click the info buttonshow extra settings beside this controla floating box with a link inside

All phrasings
Save and share

Recognize

Small contextual surfaces

Try it

Do you need a short explanation, interactive contextual content, or an action list?

Popover

Shared trial context

A project workspace must reveal brief help, supporting details, or a short action list from a compact control without leaving the current task.

Popover

Mission

Popover

Open the explanation, follow its internal focus order, then close it without losing your place.

Invoice detail

One service line and its related fees.

Live result

Details are closed.

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 nonmodal panel opens beside the billing label and its link can be focused.
Edge case
When space is tight, collision handling repositions the panel without covering the trigger or moving focus unexpectedly.

What this example shows

Unlike Tooltip, a Popover can contain interactive content; unlike Dropdown menu, it is not limited to a list of actions.

Which fits your need?

Popover

Showing a compact explanation with a link

Tooltip

Explaining an unfamiliar icon

Which component will you use here?
Difference and sources

Unlike Tooltip, a Popover can contain interactive content; unlike Dropdown menu, it is not limited to a list of actions.

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.

    Trigger

    The control that opens or reveals the surface.

    Position in the atlas

    Relationship map

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

    • Chapter

      Small contextual surfaces

      Popover belongs to this comparison group.

    • Do not confuse

      Tooltip

      Choose Popover if the content includes a link, a control, or more than a sentence or two. Choose Tooltip if a few words clarify an unfamiliar icon and losing them on mobile is acceptable.

      Compare this pair
    • Do not confuse

      Dropdown menu

      Choose Popover if the content is explanatory or interactive and not limited to a list of actions. Choose Dropdown menu if every item is an action such as Edit or Archive.

      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: flyout, info popover, context panel

    • a small panel when I click the info button
    • show extra settings beside this control
    • a floating box with a link inside
    • open help without blocking the page
    • a little card anchored to the button
    • click to reveal more details in place

    Choose

    Use it when

    • Showing a compact explanation with a link
    • Editing a small group of contextual settings

    Avoid it when

    • The task needs a large or modal workflow
    • The surface is only a short passive hint

    Compare

    Compare similar concepts

    Platform equivalents

    The same interaction can have a different name or contract on each platform. Check the mapping before choosing an API.

    • HTML

      Direct

      [popover] + showPopover()

      HTML Living Standard 2026-09

      The Popover API supplies top-layer display and light-dismiss behavior; focus design remains content-dependent.

      Verified Official documentation
    • WAI-ARIA APG

      No direct primitive

      No direct primitive

      APG has no generic popover pattern; choose dialog, menu, listbox, or tooltip semantics from the content.

      Verified
    • Radix UI

      Direct

      Popover.Root

      @radix-ui/react-popover 1.1.x

      The primitive coordinates an anchored non-modal surface, portal, collision handling, dismissal, and focus.

      Verified Official documentation
    • shadcn/ui

      Direct

      Popover

      shadcn/ui docs 2026-09-03

      The Popover recipe exposes the Radix anchored-surface behavior with local styling.

      Verified Official documentation
    • Material UI

      Direct

      Popover

      Material UI v9.4.0

      Popover positions a modal-based surface against an anchor and blocks outside interaction by default.

      Verified Official documentation
    • SwiftUI

      Direct

      .popover

      SwiftUI documentation 2026-09

      The modifier presents content from an attachment anchor and adapts its presentation by platform and size class.

      Verified Official documentation
    • Jetpack Compose

      Partial

      Popup

      Compose UI 2026-06

      Popup supplies a floating window and positioning; anchor geometry, focus model, and content semantics remain custom.

      Verified Official documentation
    • Flutter

      Partial

      OverlayPortal

      Flutter API docs 2026-09

      OverlayPortal keeps floating content in an overlay, but anchoring, dismissal, focus, and semantics must be composed.

      Verified Official documentation

    Impact profile

    Measured implementation costs and operating constraints for this SkillCodex specimen. A missing evaluation is never treated as free.

    Rendering
    Client
    Lazy weight
    22 kB-gzip
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Sum of gzip -9 bytes for the lazy files of module 50349 in .next/server/app/(en)/term/[slug]/page/react-loadable-manifest.json after pnpm build:local at c9f1299.
    Low-end devices
    Fine
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Loaded the 390 x 844 term route in isolated Chromium with 6x CPU throttling and reduced motion, then exercised the first state change; failures are recorded as non-blocking warnings.
    CPU / GPU
    Radix positions an interactive DOM overlay and React tracks its state; no canvas or WebGL path is present.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Static source inspection of the target lab module plus an interaction on the isolated Chromium verification route; checked DOM/React work and absence of canvas or WebGL.
    Reduced motion
    The global reduced-motion contract collapses animation and transition durations; the same states and controls remain available.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Inspected src/app/globals.css prefers-reduced-motion rules and repeated the target interaction with reducedMotion=reduce in Chromium.
    Static fallback
    Without JavaScript, the term route stays on its localized Loading fallback; the profile and initial specimen are not revealed.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Loaded all ten prerendered routes from a local next start build in Chromium with JavaScript disabled; each HTTP 200 remained on the localized Loading fallback, so the profile and specimen were not revealed.
    Server rendering
    Hydrates
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Inspected the prerendered route response, then loaded the same route with JavaScript enabled and exercised the hydrated client specimen.
    Maintenance
    Stable

    Good fit

    • Compact contextual controls or details anchored to one trigger.

    Avoid when

    • Long workflows or content that must remain visible in the page layout.

    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

      Activate the trigger, then use a control inside the opened panel.

      Expected result

      The panel opens deliberately beside its trigger, and its content can be reached in a logical keyboard order.

    2. 2. Do this

      Press Escape, then open the panel again and use its close control if present.

      Expected result

      Both dismissal paths close the panel and return focus to its trigger.

    3. 3. Do this

      Open the popover near an edge of a narrow window and continue using the page.

      Expected result

      The panel remains readable within the window; this non-modal surface does not trap focus or make the background inert.

    Full contract
    1. 1The panel opens only after deliberate activation
    2. 2Interactive content has a logical focus order
    3. 3Escape and the close control restore focus
    4. 4The background remains usable because the panel is nonmodal

    Understand → Recognize → Choose → Compare

    Pack for your agent

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

    Implement correctly

    Build Popover without breaking its behavior

    # Implement Popover in your agent
    
    ## Objective
    Implement Popover for this verified behavior: A small contextual surface opened deliberately to show supporting content or controls without making the whole page modal.
    
    ## Prerequisites
    - Inspect the repository, design system, and existing tests first.
    - Preserve unrelated changes and keep the file scope bounded.
    - Confirm that Popover matches the need before writing code.
    
    ## Required behavior
    - Activating the trigger opens the surface, and activating it again can close it.
    - A pointer press outside the noncritical surface dismisses it without committing an action.
    - Escape closes the temporary surface and returns focus to a sensible control.
    
    ## States to cover
    - Popover closed
    - Popover open
    
    ## Accessibility
    - ARIA role: dialog
    - The primary control or named region for Popover has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    - Focus either remains on the trigger for simple content or moves predictably to the first meaningful control.
    - Escape, the explicit close control, or a safe outside press closes it and restores focus to the trigger.
    - The trigger exposes expanded state and references the popup; a named dialog is announced when that pattern is used.
    - Enter or Space opens from the trigger
    - Tab moves through interactive content
    - Escape closes the popover
    
    ## When not to use
    - The task needs a large or modal workflow
    - The surface is only a short passive hint
    
    ## Acceptance criteria
    - The panel opens only after deliberate activation
    - Interactive content has a logical focus order
    - Escape and the close control restore focus
    - The background remains usable because the panel is nonmodal
    
    ## 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.
    
    • @radix-ui/react-popover
    • 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 Popover on a real journey

    # Verify Popover after implementation
    
    ## Objective
    Audit the Popover 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:f85f45220d4288035b36bc34b96ce6f32e859aa2329b9f39444809c1ec592928

    Diagnose a problem

    Find and fix the Popover defect

    # Debug Popover 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 Popover.
    - 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 panel opens only after deliberate activation
    - Interactive content has a logical focus order
    - Escape and the close control restore focus
    - The background remains usable because the panel is nonmodal
    
    ## 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.
    
    • @radix-ui/react-popover
    • 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 Popover fix

    # Prevent the Popover regression
    
    ## Objective
    Turn the reproduced cause into a focused regression test and compare Popover 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:328d0183f80b56d077ad2e4b13e68c2a5fbda6ae99afa74e924c4eaf1e881440

    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:39008ece8168fac17dd0ab747204340ded0534ae9f43023ef861d9dfcbbfcb51

    In code

    TechnologyPrimitiveVersionCaveat
    @radix-ui/react-popover

    Popover.Root

    @radix-ui/react-popover@1.1.19Radix supplies positioning and focus hooks; this use remains nonmodal and its dismissal rules come from the product contract.

    Technical details

    Behaviors

    • Toggle on activation

      Activating the trigger opens the surface, and activating it again can close it.

    • Dismiss outside

      A pointer press outside the noncritical surface dismisses it without committing an action.

    • Dismiss with Escape

      Escape closes the temporary surface and returns focus to a sensible control.

    States

    • Popover closed

      Popover closed

    • Popover open

      Popover open

    State transitions

    • Popover closed → Popover open

      The trigger is activated with pointer, touch, Enter, or Space.

    • Popover open → Popover closed

      Close is activated, Escape is pressed, or an allowed outside interaction occurs.

    Test scenarios

    Context
    A billing table offers a compact explanation of usage-based charges and a link to details.
    Mission
    Open the explanation, follow its internal focus order, then close it without losing your place.
    Primary state
    The nonmodal panel opens beside the billing label and its link can be focused.
    Edge case
    When space is tight, collision handling repositions the panel without covering the trigger or moving focus unexpectedly.

    Visual signals

    • Compact floating surface
    • Anchored to a trigger
    • May contain links or controls

    Behavioral signals

    • Opens after deliberate activation
    • Usually nonmodal
    • Closes on Escape or an outside press

    Accessibility

    Role
    dialog
    Accessible name
    The primary control or named region for Popover has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    Focus
    Focus either remains on the trigger for simple content or moves predictably to the first meaningful control.
    Dismissal
    Escape, the explicit close control, or a safe outside press closes it and restores focus to the trigger.
    Scroll
    Page scrolling stays available. The floating surface remains anchored to its trigger or closes when that trigger leaves the viewport.
    Announcement
    The trigger exposes expanded state and references the popup; a named dialog is announced when that pattern is used.
    Keyboard
    • Enter or Space opens from the trigger
    • Tab moves through interactive content
    • Escape closes the popover

    Bindings

    Open the HTML, ARIA, Radix, and shadcn matrix
    • Popover.Root

      implementationKind
      radix
      nativeElement
      Not applicable
      ariaPattern
      nonmodal dialog when interactive content requires it
      radixPrimitive
      Popover
      shadcnRecipe
      Popover
      runtimeDependency
      @radix-ui/react-popover@1.1.19
      packageName
      @radix-ui/react-popover
      exportName
      Popover.Root
      exactVersion
      1.1.19
      status
      verified
      sourceId
      source-ui-radix-popover
      deprecationStatus
      active
      replacement
      Not applicable
      validFrom
      Not applicable
      validUntil
      Not applicable

      Equivalence caveat: Radix supplies positioning and focus hooks; this use remains nonmodal and its dismissal rules come from the product contract.

      Verify binding source

    Sources

    • Radix Primitives: Popover
      sourceId
      source-ui-radix-popover
      kind
      documentation
      canonicalUrl
      https://www.radix-ui.com/primitives/docs/components/popover
      publisher
      Radix Primitives
      sourceRevision
      http-etag:W/"336d513dc97145e18c472483daaa33ec"
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:b1da962392e2eef1748cf3038190d63d3a3ac94b2267bfb5e38414c773620964
      status
      verified

      Claim covered: Popover: documented parts, state APIs, interaction behavior, and implementation limits for Radix Popover.

    • 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: Popover: normative ARIA role definitions and constraints for the stated accessible role.

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

      Claim covered: Popover: informative WCAG guidance for evaluating visible keyboard focus appearance.

    • WAI-ARIA APG: Button Pattern
      sourceId
      source-ui-aria-button
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/ARIA/apg/patterns/button/
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-09T07:07:36Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:863329ea659a53439b0953eec0bd0af7c6219e372d0e878f75e57d263924704c
      status
      verified

      Claim covered: Popover: informative APG guidance for the button pattern: roles, states, relationships, and keyboard interaction.

    • WAI-ARIA APG: Tooltip Pattern
      sourceId
      source-ui-aria-tooltip
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-09T07:07:36Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:28c008aec8fa19be8f285665c3947ac8c9f2604a07d4265c152ffa706cc92461
      status
      verified

      Claim covered: Popover: informative work-in-progress APG guidance for tooltip role, trigger description, focus retention, pointer continuity, and Escape dismissal.