Popover

Popover is a component that floats around an element to display information.

Usage

import { Popover } from "@yamada-ui/react"
<Popover.Root>
  <Popover.Anchor />
  <Popover.Trigger />
  <Popover.Content>
    <Popover.Header />
    <Popover.Body />
    <Popover.Footer />
  </Popover.Content>
</Popover.Root>

Change Size

Display Popover on Different Element

To display a popover on a different element, use Popover.Anchor.

Here Display Popover

Change Animation

To change the animation, set animationScheme to "block-start", "inline-end", etc. By default, "scale" is set.

Change Placement

To change the placement, set placement to "start", "end-end", etc. By default, "end" is set.

Change Duration

To change the duration, set duration to a number (seconds).

Change Offset

To change the offset, set gutter or offset to a value.

Use Modal

To use modal, set modal to true. This enables scroll blocking and focus trapping.

Disable

To disable the popover, set disabled to true.

Disable Close on Outside Click

To disable closing when clicking outside, set closeOnBlur to false.

Disable Close on ESC Key

To disable closing when pressing the ESC key, set closeOnEsc to false.

Disable Auto Focus

To disable automatic focus when the popover opens, set autoFocus to false.

Set Initial Focus

To set the initial focus, pass a Ref to initialFocusRef.

Block Scroll

To block scrolling while the popover is open, set blockScrollOnMount to true.

Close on Scroll

To automatically close the popover when scrolling, set closeOnScroll to true.

Nest Popovers

Control

Props

Accessibility

Currently, this section is being updated due to the migration of v2.