enes

Flyout

The Flyout component is a floating panel that can be used to display additional information or options in a non-intrusive way. It is fully accessible and follows Fluent UI design principles for a seamless user experience.

This is the content of the flyout.

Usage

A flyout renders a floating surface around its content. On its own it is a static panel; set the floating prop and pass a reference element to have Floating UI position it against another element.

<script>
  import { Flyout } from 'fluentui-svelte';
</script>

<Flyout>
  <p>This is the content of the flyout.</p>
</Flyout>

Round Corners

Use the roundCorners prop to control which corners of the flyout are rounded. It accepts 'all', 'top', 'bottom', 'left' or 'right'.

This is the content of the flyout.

Component Props

NameTypeDefaultDescription
ref bindableHTMLElementThe DOM reference of the flyout element.
childrenSnippetThe content of the flyout.
floatingbooleanfalsePositions the flyout with floating-ui instead of leaving it in the normal flow.
referenceHTMLElementThe element the flyout is positioned against when `floating` is set.
placementPlacement'bottom'Where the flyout is placed relative to its reference.
onPlacementChange(placement: Placement) => voidCalled whenever floating-ui settles on a different placement.
roundCorners'all' | 'top' | 'bottom' | 'left' | 'right''all'Which corners of the flyout are rounded.
offsetnumber8The distance in pixels between the flyout and its reference.
placementConfigAutoPlacementOptionsThe auto placement configuration handed over to floating-ui.
Element Attributes (div)