1. framework components
  2. floating panel

Floating Panel

A draggable, resizable floating panel with minimize/maximize controls.

Warning

This feature is currently marked as beta and not intended for production use. It may receive breaking changes before its stable release.

Size Constraints

Use the minSize and maxSize props to set size constraints on the Floating Panel.

Controlled

Control the open state and size of the Floating Panel with your own state.

Anchor Position

Position the panel relative to another element using the defaultPosition prop.

Resize Triggers

Add resize triggers on all sides and corners of the Floating Panel using the axis prop.

Disable Dragging

Disable dragging by setting the draggable prop to false. The panel will remain in a fixed position but can still be resized.

Disable Resizing

Disable resizing by setting the resizable prop to false. The panel will have a fixed size but can still be dragged.

Direction

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

Anatomy

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

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

<FloatingPanel>
	<FloatingPanel.Trigger />
	<Portal>
		<FloatingPanel.Positioner>
			<FloatingPanel.Content>
				<FloatingPanel.DragTrigger>
					<FloatingPanel.Header>
						<FloatingPanel.Title />
						<FloatingPanel.Control>
							<FloatingPanel.StageTrigger />
							<FloatingPanel.CloseTrigger />
						</FloatingPanel.Control>
					</FloatingPanel.Header>
				</FloatingPanel.DragTrigger>
				<FloatingPanel.Body />
				<FloatingPanel.ResizeTrigger />
			</FloatingPanel.Content>
		</FloatingPanel.Positioner>
	</Portal>
</FloatingPanel>

API Reference

Unable to load component information for svelte/floating-panel

View page on GitHub