Action bar

Contextual information and actions related to a specific area on the page.
Import
import { ActionBar } from "@uicapsule/components";
import type { ActionBarProps } from "@uicapsule/components";
Related components
Works with any type of content


Usage

ActionBar can be used at any application level and may play many different roles, from control panels to price display areas in the product checkout. It provides a content slot and allows any content layout composition with utilities like View.

<ActionBar>
<View gap={3} direction="row">
<Placeholder />
<View.Item grow>
<Placeholder />
</View.Item>
</View>
</ActionBar>

Position

ActionBar can be used for displaying it as a top or bottom content section. Changing its position will change the side where the divider is displayed

<ActionBar position="top">
<Placeholder />
</ActionBar>

Sizes

ActionBar supports large size for the page level layout areas, like header or footer. Using it will increase the padding size of the ActionBar on desktop screens.

<ActionBar size="large">
<Placeholder />
</ActionBar>

Composition

ActionBar is highly composable and efficiently works for combining layout utilities, text content, action elements, and other components.

<Card padding={0}>
<Placeholder h={200} />
<ActionBar>
<View direction="row" gap={4}>
<View.Item columns={6}>
<Button color="primary" fullWidth>
Confirm
</Button>
</View.Item>
<View.Item columns={6}>
<Button color="critical" variant="ghost" fullWidth>
Cancel
</Button>
</View.Item>
</View>
</ActionBar>
</Card>

Accessibility

  • When used for displaying a set of controls, use it together with the toolbar role and additional keyboard navigation.
  • Action bar can be linked with its internal content using accessibility ids:
<ActionBar attributes={{ role: "region", "aria-labelledby": "label-id" }}>
<Text as="h3" variant="title-3" attributes={{ id: "label-id" }}>
Action bar title
</Text>
</ActionBar>
Previous