1. framework components
  2. popover

Popover

Small overlay panels positioned relative to a trigger.

Breaking convention in Skeleton, this component is provided “headless”. Meaning no default styles are applied out of the box. This ensures you retain full control of all styling for maximum flexibility.

Anchor

Use the Anchor component to position the popover contents relative to an element other than the trigger.

Arrow

Visually connects the popover content to the trigger element. Will automatically align based on the selected side.

Z-Index

By default Skeleton does not take an opinionated stance regarding z-index stacking. The result is the component can sometimes be occluded beneath other elements with a higher index. The Z-Index can controlled by applying a utility class to the Positioner component.

Sibling (10)

Provider Pattern

Use the Provider Pattern to gain access to the inner component APIs.

Direction

Set the text direction (ltr or rtl) using the dir prop.

Anatomy

Here’s an overview of how the Popover component is structured in code:

svelte
<script lang="ts">
	import { Popover, Portal } from '@skeletonlabs/skeleton-svelte';
</script>

<Popover>
	<Popover.Anchor />
	<Popover.Trigger />
	<Portal>
		<Popover.Positioner>
			<Popover.Content>
				<Popover.Title />
				<Popover.Description />
				<Popover.CloseTrigger />
				<Popover.Arrow>
					<Popover.ArrowTip />
				</Popover.Arrow>
			</Popover.Content>
		</Popover.Positioner>
	</Portal>
</Popover>

API Reference

Unable to load component information for svelte/popover

View page on GitHub