Popover
Spring Popover
A popover panel that springs out of its trigger with an arrow, on any of four sides.
npx motionsnack add spring-popoverCustomize
<SpringPopover />Props
17 properties
| Property | Type | Default | Description |
|---|---|---|---|
| action | { label: string; href?: string } | { label: 'Send invites', href: '' } | Main action of the panel. With href it is a link, without one a button that closes the panel. An empty label hides it. |
| trigger | ReactNode | 'Open popover' | Content of the trigger button. |
| open | boolean | - | Open state. With a value the component is controlled. |
| onOpenChange | (open: boolean) => void | - | Called with the new state whenever the panel opens or closes. |
| onAction | () => void | - | Called when the main action is pressed. |
| className | string | '' | Extra classes on the wrapper around the trigger. |
| triggerLabel | string | 'Open popover' | Text of the trigger button. |
| title | string | 'Invite your team' | Heading of the panel. An empty string hides it. |
| description | string | 'Share this project with up to five teammates. They can comment and edit right away.' | Body text of the panel. An empty string hides it. |
| dismissLabel | string | 'Not now' | Text of the quiet button that closes the panel. An empty string hides it. |
| side | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Side of the trigger the panel opens on. |
| align | 'start' | 'center' | 'end' | 'start' | Alignment of the panel along the trigger. |
| defaultOpen | boolean | false | Open state at the start when the component is uncontrolled. |
| bounce | number | 0.35 | Bounce of the spring the panel opens with. |
| duration | number | 0.45 | Seconds the panel takes to settle. |
| closeOnOutsideClick | boolean | true | Close when the user presses outside the popover. |
| closeOnEscape | boolean | true | Close when the user presses Escape. |
About Spring Popover
A trigger button with a panel holding a title, a short text, a main action and a quiet dismiss button. The panel grows out of the edge that faces the trigger: it scales up, fades in and overshoots slightly before it settles, with a small arrow pointing back at the button. It can open above, below, left or right of the trigger. A press outside, the Escape key or tabbing away closes it, and focus moves into the panel on open and returns to the trigger on close. Open state works controlled or uncontrolled. With reduced motion the panel only fades.
What's included
- Spring scale and fade from the trigger side
- Top, bottom, left and right placement with an arrow
- Closes on outside press and Escape
- Focus moves in and returns to the trigger
- Title, text, action and dismiss as props
- Controlled and uncontrolled open state
- Light and dark, reduced motion respected
- Type
- Animated React popover component
- Library
- Components · Popover
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-09-20
- Install
npx motionsnack add spring-popover