Action Bar

A floating bar that appears when items are selected, providing contextual actions.

Anatomy

<script>
  import {
    ActionBar,
    ActionBarSelectionTrigger,
    ActionBarSeparator,
    ActionBarCloseButton,
  } from "@saas-ui/svelte/components/action-bar";
</script>

<ActionBar open={true}>
  <ActionBarSelectionTrigger>2 selected</ActionBarSelectionTrigger>
  <ActionBarSeparator />
  <Button variant="outline" size="sm">Delete</Button>
  <ActionBarCloseButton />
</ActionBar>

Examples

Basic Accessibility

Basic ActionBar with ActionBarSelectionTrigger and action buttons.

Closable Accessibility

ActionBar with ActionBarCloseButton for dismissing.

Interactive Accessibility

Interactive demo showing action bar responding to checkbox selection.

Multiple Actions Accessibility

Action bar with multiple actions including destructive actions.

Props

ActionBar

The root container component that renders a floating bar at the bottom of the screen.

Prop Type Default Description
open boolean false Whether the action bar is open/visible.
onOpenChange (details: { open: boolean }) => void - Callback fired when the open state changes.
closeOnInteractOutside boolean false Whether to close the action bar when clicking outside.
children Snippet - Content to render inside the action bar.
class string - Additional CSS classes to apply.

ActionBarSelectionTrigger

A button that displays the selection count or status.

Prop Type Default Description
children Snippet - Content to render inside the trigger (typically 'X selected').
class string - Additional CSS classes to apply.

ActionBarSeparator

A visual separator between action groups.

Prop Type Default Description
class string - Additional CSS classes to apply.

ActionBarCloseButton

A button to dismiss the action bar.

Prop Type Default Description
aria-label string "Close" Accessible label for the close button.
class string - Additional CSS classes to apply.