Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aria-ui/popover

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aria-ui/popover

## PopoverContent

  • 0.0.17
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@aria-ui/popover

PopoverContent

PopoverContentElement

A custom PopoverContent element.

new PopoverContentElement(): PopoverContentElement
PropertyTypeDescription
altBoundaryboolean

See

https://floating-ui.com/docs/detectoverflow

Default

true
autoUpdateboolean | Partial<object>

Options to activate auto-update listeners

See

https://floating-ui.com/docs/autoUpdate

Default

true
boundaryBoundary

See

https://floating-ui.com/docs/detectoverflow

Default

'clippingAncestors'
elementContextElementContext

See

https://floating-ui.com/docs/detectoverflow

Default

'floating'
fitViewportboolean

Whether to constrain the floating element's width and height to not exceed the viewport.

Default

false
flipboolean | Placement[]

Whether to flip the placement in order to keep it in view when the preferred placement(s) will overflow the clipping boundary. You can also provide an array of placements to try sequentially if the preferred placement does not fit.

Default

true
hideboolean

Whether to hide the floating element when the reference element or the floating element is fully clipped.

Default

false
hoistbooleanWhether to use the browser Popover API to place the floating element on top of other page content. When enabled, the floating element won't be clipped by an ancestor. This provides a similar result to React's <Portals> or Vue's <Teleport>.

Default

true
inlineboolean

Whether to improve positioning for inline reference elements that span over multiple lines.

Default

false
offsetnull | OffsetOptions

The distance between the reference and floating element.

Default

4
onEscapeKeyDownnull | (event: KeyboardEvent) => void

Event handler called when the escape key is pressed.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onFocusOutsidenull | (event: FocusOutsideEvent) => void

Event handler called when the focus is moved outside the element.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onInteractOutsidenull | (event: InteractOutsideEvent) => void

Function called when an interaction (pointer or focus) happens outside the component.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onPointerDownOutsidenull | (event: PointerDownOutsideEvent) => void

Event handler called when the pointer is pressed down outside the element.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

overflowPaddingnumber

Default

4
overlapboolean

Whether the floating element can overlap the reference element to keep it in view.

Default

false
placementPlacement

The initial placement of the floating element

Default

"top"
rootBoundaryRootBoundary

See

https://floating-ui.com/docs/detectoverflow

Default

'viewport'
sameHeightboolean

Whether to constrain the floating element's height so that it matches the reference element.

Default

false
sameWidthboolean

Whether to constrain the floating element's width so that it matches the reference element.

Default

false
shiftboolean

Whether the floating element should shift to keep it in view.

Default

true
strategy"absolute" | "fixed"

The strategy to use for positioning

Default

"absolute"
transformboolean

Whether to use transform: translate3d() for positioning instead of top and left (layout) to place the floating element.

Default

false

PopoverContentDataAttributes

PropertyType
data-align"center" | "start" | "end"
data-side"bottom" | "left" | "right" | "top"
data-state"open" | "closed"

PopoverContentProps

PropertyTypeDescription
altBoundaryboolean

See

https://floating-ui.com/docs/detectoverflow

Default

true
autoUpdateboolean | Partial<object>

Options to activate auto-update listeners

See

https://floating-ui.com/docs/autoUpdate

Default

true
boundaryBoundary

See

https://floating-ui.com/docs/detectoverflow

Default

'clippingAncestors'
elementContextElementContext

See

https://floating-ui.com/docs/detectoverflow

Default

'floating'
fitViewportboolean

Whether to constrain the floating element's width and height to not exceed the viewport.

Default

false
flipboolean | Placement[]

Whether to flip the placement in order to keep it in view when the preferred placement(s) will overflow the clipping boundary. You can also provide an array of placements to try sequentially if the preferred placement does not fit.

Default

true
hideboolean

Whether to hide the floating element when the reference element or the floating element is fully clipped.

Default

false
hoistbooleanWhether to use the browser Popover API to place the floating element on top of other page content. When enabled, the floating element won't be clipped by an ancestor. This provides a similar result to React's <Portals> or Vue's <Teleport>.

Default

true
inlineboolean

Whether to improve positioning for inline reference elements that span over multiple lines.

Default

false
offsetnull | OffsetOptions

The distance between the reference and floating element.

Default

4
onEscapeKeyDownnull | (event: KeyboardEvent) => void

Event handler called when the escape key is pressed.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onFocusOutsidenull | (event: FocusOutsideEvent) => void

Event handler called when the focus is moved outside the element.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onInteractOutsidenull | (event: InteractOutsideEvent) => void

Function called when an interaction (pointer or focus) happens outside the component.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

onPointerDownOutsidenull | (event: PointerDownOutsideEvent) => void

Event handler called when the pointer is pressed down outside the element.

By default, the popover will be closed. It can be prevented by calling event.preventDefault.

overflowPaddingnumber

Default

4
overlapboolean

Whether the floating element can overlap the reference element to keep it in view.

Default

false
placementPlacement

The initial placement of the floating element

Default

"top"
rootBoundaryRootBoundary

See

https://floating-ui.com/docs/detectoverflow

Default

'viewport'
sameHeightboolean

Whether to constrain the floating element's height so that it matches the reference element.

Default

false
sameWidthboolean

Whether to constrain the floating element's width so that it matches the reference element.

Default

false
shiftboolean

Whether the floating element should shift to keep it in view.

Default

true
strategy"absolute" | "fixed"

The strategy to use for positioning

Default

"absolute"
transformboolean

Whether to use transform: translate3d() for positioning instead of top and left (layout) to place the floating element.

Default

false

PopoverRoot

PopoverRootElement

A custom PopoverRoot element.

new PopoverRootElement(): PopoverRootElement
PropertyTypeDescription
defaultOpenboolean

Whether the popover is open by default.

Default

false
onOpenChangenull | (open: boolean) => void

Event handler called then the open state changes because of a user interaction.

Default

null
openboolean

Whether the popover is open.

Default

false

PopoverTrigger

PopoverTriggerElement

A custom PopoverTrigger element.

new PopoverTriggerElement(): PopoverTriggerElement

FAQs

Package last updated on 21 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc