Actions
FloatingActionButtons
A draggable, edge-snapping floating group of action buttons.
<UiFloatingActionButtons />Default side
defaultSide is the edge the group starts snapped to when you let it manage its own position. Drag the pill by its grip — or by any empty space in it — towards another edge of the box and it snaps to whichever is nearest, switching between a horizontal and a vertical layout as it crosses. defaultSide is only the starting point, so it's ignored the moment you pass position.
Drag either pill towards an edge — it snaps to the nearest one
Position
position takes the side away from the component and puts it in your hands. Pass it — with v-model:position if you also want dragging to write back — and the group sits where you say; omit it and the group keeps its own side internally, starting from defaultSide. Useful when the edge has to follow something else on the page, like a panel that opens on the right.
Handle
handle shows the drag grip at the end of the pill. Turning it off doesn't stop the group being dragged — empty space and the buttons themselves still work — it only removes the affordance that says so, which is worth doing when the grip would be the widest thing in a two-button group.
Draggable
draggable is the one that actually pins the group down. Set it to false and the pill stays on the side it was given, grip and all gestures inert — the right setting for a toolbar whose position is part of the layout rather than a preference.
This pill can't be moved
A real drag (movement past a small threshold) suppresses the click that would otherwise fire on release — so dragging a button around doesn't also trigger its @click.
Margin
margin is the distance in pixels kept between the group and the edge of its bounds, whether that's the viewport or a container you named.
Container
container confines the group to one element's box instead of the viewport. Pass a template ref: dragging, snapping and margin are all measured against that element, which is what every preview on this page does — without it the pill would be position: fixed and drag across the whole page.
Bounded to this box — drag it and it never leaves
Without a container prop it's position: fixed and drags across the whole viewport; pass a container element ref to confine it (and switch it to position: absolute, scrolling with that container).
API Reference
Generated from the component's source — props, slots and emits as the component actually declares them.
Props
"top" | "bottom" | "left" | "right"'right'"top" | "bottom" | "left" | "right"HTMLElement | nullundefined (the viewport)Slots
defaultEmits
update:position[value: Side]Types
type Side = "top" | "bottom" | "left" | "right";