Float Bar
Floating toolbar fixed to the bottom of the viewport, with a blurred overlay background. For bulk actions and unsaved-changes prompts.
<arc-float-bar>Overview
FloatBar is a toolbar fixed near the bottom of the viewport, or the top with position="top", that holds actions for whatever the user is doing right now. It's centered, on the --surface-overlay background with a 12px backdrop blur. Setting open slides it in from its edge, and clearing it slides it back out. arc-open and arc-close fire on each change.
The usual case is a bulk-action bar that shows while rows in a table or list are selected: "3 items selected" with Archive and Delete. It also suits an unsaved-changes prompt with Save and Discard. Show it from your application state, such as a selection or a dirty form, and hide it when that state clears.
It doesn't block the page: there's no backdrop, no scroll lock and no focus trap. For a bar that's always there, use Toolbar, and for a panel the user opens and closes, use Drawer.
Guidelines
Do
- Keep it short: a status message and two or three buttons
- Close it as soon as the reason for it goes away, for example when the selection is cleared
- Use the default bottom position for most bars, and `position="top"` for consent banners
Don't
- Don't put navigation links in it. Use TopBar or Sidebar
- Don't put forms or multi-step flows in it
- Don't show two at the same edge at once. They overlap
- Don't use it in place of a toast. It's for actions, and Toast is for notifications
Features
- Slides and fades with the `--ease-out-expo` easing
- CSS part: `bar`
Preview
Usage
This component needs JavaScript. Use the Web Component or a framework wrapper.
<arc-float-bar id="bulk-actions" position="bottom">
<span>3 items selected</span>
<arc-button variant="secondary" size="sm">Archive</arc-button>
<arc-button variant="secondary" size="sm">Delete</arc-button>
</arc-float-bar>
<script>
const bar = document.querySelector('#bulk-actions');
// Show when items are selected
bar.open = true;
bar.addEventListener('arc-close', () => console.log('Float bar hidden'));
</script>import { FloatBar, Button } from '@arclux/arc-ui-react';
function BulkActions({ selectedCount }: { selectedCount: number }) {
return (
<FloatBar open={selectedCount > 0} position="bottom">
<span>{selectedCount} items selected</span>
<Button variant="secondary" size="sm">Archive</Button>
<Button variant="secondary" size="sm">Delete</Button>
</FloatBar>
);
}<script setup>
import { ref } from 'vue';
import { FloatBar, Button } from '@arclux/arc-ui-vue';
const selectedCount = ref(3);
</script>
<template>
<FloatBar :open="selectedCount > 0" position="bottom">
<span>{{ selectedCount }} items selected</span>
<Button variant="secondary" size="sm">Archive</Button>
<Button variant="secondary" size="sm">Delete</Button>
</FloatBar>
</template><script>
import { FloatBar, Button } from '@arclux/arc-ui-svelte';
let selectedCount = $state(3);
</script>
<FloatBar open={selectedCount > 0} position="bottom">
<span>{selectedCount} items selected</span>
<Button variant="secondary" size="sm">Archive</Button>
<Button variant="secondary" size="sm">Delete</Button>
</FloatBar>import { Component } from '@angular/core';
import { FloatBar, Button } from '@arclux/arc-ui-angular';
@Component({
imports: [FloatBar, Button],
template: `
<arc-float-bar [open]="selectedCount > 0" position="bottom">
<span>{{ selectedCount }} items selected</span>
<arc-button variant="secondary" size="sm">Archive</arc-button>
<arc-button variant="secondary" size="sm">Delete</arc-button>
</arc-float-bar>
`,
})
export class BulkActionsComponent {
selectedCount = 3;
}import { createSignal } from 'solid-js';
import { FloatBar, Button } from '@arclux/arc-ui-solid';
function BulkActions() {
const [selectedCount] = createSignal(3);
return (
<FloatBar open={selectedCount() > 0} position="bottom">
<span>{selectedCount()} items selected</span>
<Button variant="secondary" size="sm">Archive</Button>
<Button variant="secondary" size="sm">Delete</Button>
</FloatBar>
);
}import { useState } from 'preact/hooks';
import { FloatBar, Button } from '@arclux/arc-ui-preact';
function BulkActions() {
const [selectedCount] = useState(3);
return (
<FloatBar open={selectedCount > 0} position="bottom">
<span>{selectedCount} items selected</span>
<Button variant="secondary" size="sm">Archive</Button>
<Button variant="secondary" size="sm">Delete</Button>
</FloatBar>
);
}API
openbooleanfalse- Controls visibility of the float bar. Set to true when a triggering condition is met (e.g., items selected, form dirty) and false when the condition resolves.
position'bottom' | 'top''bottom'- Which edge of the viewport the float bar appears at. Bottom is standard for bulk-action bars; top works for consent banners or global alerts.
Events
arc-open- Fired when the float bar becomes visible after the open prop is set to true.
arc-close- Fired when the float bar hides after the open prop is set to false.