App Bar
An absolutely positioned container for actions and navigation anchored to edges.This component's API and documentation are under review and may change. Use with caution in production.
AppBar is a compound component for creating action bars anchored to any edge. It builds on Card for visual styling and provides structured slots for content organization.
Use AppBar inside dialogs, popovers, panels, or any container where you need persistent controls.
Installation
Usage
AppBar uses absolute positioning to span edge-to-edge. Use --rt-app-bar-height (or --rt-app-bar-width for vertical app bars) to add padding to your content.
Anatomy
AppBar is a compound component with the following parts:
Props
Root Props
The root component manages positioning and inherits Card's visual styling.
Section Props
AppBar.Left, AppBar.Center, and AppBar.Right extend Flex and accept all Flex props. They are placed on a CSS grid for true centering regardless of content width.
Plus all other Flex props (direction, wrap, p, m, etc.).
Title Props
AppBar.Title renders a truncated heading and accepts all Heading props with app bar-appropriate defaults.
Anchor
Use the anchor prop to position the app bar at different edges.
Top
The default. Anchors to the top of the scroll container.
Bottom
Anchors to the bottom, useful for action bars.
Left / Right
Vertical app bars for sidebar-style controls.
Positioning Modes
AppBar has two positioning modes: inset (default) and floating. Both use position: absolute.
Inset (Default)
By default, AppBar uses inset mode to go edge-to-edge inside Cards.
When inset (default):
- No border radius
- Edge-to-edge layout
- Only the exposed edge shows a border
Floating
Use floating for a detached look with margin from edges.
When floating:
- Full border radius from Card
- Margin from container edges (controlled by
offset) - Complete Card styling (all borders visible)
Offset
Control the margin when floating with the offset prop.
Variants
AppBar inherits all Card variants. The default is ghost for minimal visual weight.
Soft
Muted background, great for dialog headers.
Surface
Subtle background with border. Good for floating app bars.
Ghost
No visible background or border. Use when the parent provides visual context.
Sizes
Controls padding inside the app bar.
Material
Use material="translucent" for backdrop blur over images or dynamic backgrounds.
CSS Variables
AppBar exposes dimension variables so you can add padding to prevent content overlap:
--rt-app-bar-heightfor horizontal app bars (anchor="top"oranchor="bottom")--rt-app-bar-widthfor vertical app bars (anchor="left"oranchor="right")
The variables are set on the AppBar's parent element, so the AppBar and content must share a common container:
For bottom-anchored app bars, use pb="var(--rt-app-bar-height)" on your content instead.
For image or video backgrounds where content should flow behind the app bar, simply don't apply the padding.
Accessibility
- Use semantic elements and ARIA attributes as needed
- For dialog/popover context, pair with appropriate
aria-labelledbyon the container - AppBar.Title can provide the ID for accessible labeling
© 2026 Kushagra Dhawan. Licensed under MIT. GitHub. What's new.