Components
Popover
Displays content in a floating container that appears above the surrounding content.
Structure
	<script lang="ts">
  import { Popover } from "bits-ui";
</script>
 
<Popover.Root>
  <Popover.Trigger />
  <Popover.Content>
    <Popover.Close />
    <Popover.Arrow />
  </Popover.Content>
</Popover.Root>
 	<script lang="ts">
  import { Popover } from "bits-ui";
</script>
 
<Popover.Root>
  <Popover.Trigger />
  <Popover.Content>
    <Popover.Close />
    <Popover.Arrow />
  </Popover.Content>
</Popover.Root>
 Component API
Root
The root component used to manage the state of the state of the popover.
| Prop | Default | Type/Description | 
|---|---|---|
| asChild | false | booleanWhether to use render delegation with this component or not. | 
| disableFocusTrap | false | booleanWhether or not to disable the focus trap that is applied to the popover when it's open. | 
| preventScroll | false | booleanWhether or not to prevent scrolling the body while the popover is open. | 
| positioning | { position: "bottom", align: "center" } | FloatingConfigThe positioning configuration for the popover. (docs coming soon) | 
| closeOnOutsideClick | true | booleanWhether or not to close the popover when clicking outside of it. | 
| closeOnEscape | true | booleanWhether or not to close the popover when pressing the escape key. | 
| open | false | booleanThe open state of the link popover component. | 
| onOpenChange | - | (open: boolean) => voidA callback that fires when the open state changes. | 
Trigger
A component which toggles the opening and closing of the popover on press.
| Prop | Default | Type/Description | 
|---|---|---|
| asChild | false | booleanWhether to use render delegation with this component or not. | 
| Data Attribute | Value/Description | 
|---|---|
| data-state | 'open' | 'closed'The open state of the link preview. | 
Content
The contents of the popover which are displayed when the popover is open.
| Prop | Default | Type/Description | 
|---|---|---|
| asChild | false | booleanWhether to use render delegation with this component or not. | 
Close
A button which closes the popover when pressed and is typically placed in the content.
| Prop | Default | Type/Description | 
|---|---|---|
| asChild | false | booleanWhether to use render delegation with this component or not. | 
Arrow
An optional arrow element which points to the trigger when the popover is open.
| Prop | Default | Type/Description | 
|---|---|---|
| asChild | false | booleanWhether to use render delegation with this component or not. | 
| size | 8 | numberThe height and width of the arrow in pixels. | 
| Data Attribute | Value/Description | 
|---|---|
| data-arrow | Present on the arrow element. | 
🚧 UNDER CONSTRUCTION 🚧