App Bar

A header element for the top of your page layout. Pairs well with the App Shell.

javascript
import { AppBar } from '@brainandbones/skeleton';

Examples

Usage

html
<AppBar>
	<svelte:fragment slot="lead">(lead)</svelte:fragment>
	(center)
	<svelte:fragment slot="trail">(trail)</svelte:fragment>
</AppBar>

Properties

Prop Type Default Description
backgroundstringbg-surface-100 dark:bg-surface-800Provide classes to set background color.
borderstring-Provide classes to set border styles.
paddingstringpx-4 py-4 md:py-6Provide classes to set padding.
shadowstringshadow-lgProvide classes to define a box shadow.
spacestringspace-x-4Provide classes to set horizontal spacing.

Slots

Name Style Prop Description
defaultslotDefaultProvides content within the center of the bar, e.g. a search element.
leadslotLeadProvides content on the left end of the bar, e.g. a logo.
trailslotTrailProvides content on the right end of the bar, e.g. navigation elements.

Accessibility

ARIA Guidelines
Prop Type Description
labelstringProvide a semantic ID for the ARIA label.
labelledbystringProvide the ID of the element that labels the toolbar.