AppBar
Top application bar with title and actions
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { AppBar } from '@dryui/ui';
</script>
<AppBar.Root>
<AppBar.Title>...</AppBar.Title>
</AppBar.Root>Import options
Root package
import { AppBar } from '@dryui/ui'Per-component subpath
import { AppBar } from '@dryui/ui/app-bar'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Default
<script lang="ts">
import { AppBar } from '@dryui/ui';
</script>
<AppBar.Root>
<AppBar.Title>My Application</AppBar.Title>
</AppBar.Root>With Actions
<script lang="ts">
import { AppBar, Button } from '@dryui/ui';
</script>
<AppBar.Root>
<AppBar.Title>Dashboard</AppBar.Title>
<Button variant="ghost" size="sm">Settings</Button>
</AppBar.Root>Sticky
<script lang="ts">
import { AppBar } from '@dryui/ui';
</script>
<AppBar.Root position="sticky">
<AppBar.Title>Sticky Bar</AppBar.Title>
</AppBar.Root>Structure
Compound components always start with AppBar.Root. Use this structure block to understand required wrappers before you wire state or styling.
AppBar.Root AppBar.Title
Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
Compound component. Start with AppBar.Root, then add only the parts you need.
AppBar.Root
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
position | staticfixedsticky | 'static' | — | — |
children | Snippet | — | ✓ | — |
Forwards <element> attributes via rest props. Common examples: id, class, aria-label.
AppBar.Title
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.