LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Components

Popover

Also called flyout or popup panel

A small floating panel anchored to the button that opened it, often with an arrow, holding a few controls and closing when you click outside.

import { Popover } from '@base-ui/react/popover';
import { Switch } from '@base-ui/react/switch';

export function SharePopover() {
  return (
    <Popover.Root>
      <Popover.Trigger className='rounded-lg border px-4 py-2 text-sm font-medium hover:bg-muted data-popup-open:bg-muted'>
        Share
      </Popover.Trigger>
      <Popover.Portal>
        {/* Base UI flips the popup above the button when there's no room below. */}
        <Popover.Positioner sideOffset={8}>
          {/* --transform-origin points at the arrow, so it grows out of the button. */}
          <Popover.Popup className='relative w-65 origin-(--transform-origin) rounded-xl border bg-background p-4 shadow-lg outline-none transition-[opacity,scale] duration-150 ease-out data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0'>
            <Popover.Arrow className='size-3 rotate-45 bg-background data-[side=bottom]:-top-1.5 data-[side=bottom]:border-t data-[side=bottom]:border-l data-[side=top]:-bottom-1.5 data-[side=top]:border-r data-[side=top]:border-b' />
            <Popover.Title className='text-sm font-semibold'>
              Share “Q3 roadmap”
            </Popover.Title>
            <form
              className='mt-3 flex gap-2'
              onSubmit={(event) => event.preventDefault()}
            >
              <input
                type='email'
                required
                aria-label='Email'
                placeholder='name@company.com'
                className='h-9 min-w-0 flex-1 rounded-md border bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring'
              />
              <button className='h-9 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground'>
                Invite
              </button>
            </form>
            <label className='mt-4 flex items-center justify-between text-sm'>
              Anyone with the link
              <Switch.Root className='flex h-5 w-9 rounded-full bg-muted p-0.5 transition-colors data-checked:bg-blue-600'>
                <Switch.Thumb className='size-4 rounded-full bg-white shadow-sm transition-transform data-checked:translate-x-4' />
              </Switch.Root>
            </label>
          </Popover.Popup>
        </Popover.Positioner>
      </Popover.Portal>
    </Popover.Root>
  );
}
Add a Share popover to the document header: clicking Share opens a 260px panel 8px below the button with a small arrow pointing at it, an email field with an Invite button, and an 'Anyone with the link' switch. Scale it in from 0.95 at the arrow over 150ms with an ease-out curve, flip it above the button when there isn't room below, close it on Escape or a click outside, and return focus to the Share button.

Paste into Layerwise or any AI coding tool.

What is Popover?

A popover opens right next to its trigger, usually with a small arrow pointing back at it, and floats above the page. It can hold real content: a short form, a color picker, sharing settings, or a calendar. Clicking outside or pressing Escape closes it, and the rest of the page keeps working.

Use a popover for quick, optional settings tied to one button. If the content is only a label, use a tooltip. If it is a list of actions, use a dropdown menu. If the task needs full attention or a decision before anything else, use a modal.

Place it below its button and flip it above when there is no room. Scale it in from the side nearest the button so it seems to grow out of it. The native HTML popover attribute handles stacking, Escape, and clicking outside, and CSS anchor positioning can pin it to its button in browsers that support it.

Often confused with

Tooltip
A tooltip shows a short label on hover or focus and holds nothing you can click. A popover opens on click and can hold inputs and buttons.
Dropdown menu
A dropdown menu is a list of actions to pick from. A popover holds other content, such as a small form or settings.
Modal
A modal blocks the whole page until you respond. A popover stays next to its button and closes as soon as you click elsewhere.

Related terms

All terms

Tooltip

A small label that appears next to an element when you hover over it or focus it, naming an icon button or adding a short hint.

Dropdown menu

A list of actions that drops down from a button when you click it, then closes as soon as you pick one.

Modal

A window that opens over the page, dims everything behind it, and blocks the rest of the interface until you finish or dismiss it.

Transform origin

The point an element rotates and scales around. It defaults to the center, and moving it changes where a transform seems to start.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
Q3 planning