Document browser
Documents
Navigation and actions keep their own touch targets as the title changes.
A Material app bar with a title, navigation action and trailing actions in Vlak tones.
Navigation and actions keep their own touch targets as the title changes.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { AndroidAppBar, AndroidAppBarAction, Icon } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/android-app-bar.
npx @noorddev/vlak-cli add android-app-bar
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/android-app-bar.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { AndroidAppBar, AndroidAppBarAction, Icon } from "@noorddev/vlak-react";
<AndroidAppBar title="Documents" navigation={<AndroidAppBarAction aria-label="Go back" onClick={goBack}><Icon name="arrow-left" /></AndroidAppBarAction>} />| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | ||
navigation | ReactNode | ||
actions | ReactNode | ||
variant | "small" | "medium" | "small" |
Also accepts Omit<HTMLAttributes<HTMLElement>, "title">.
Also accepts ButtonHTMLAttributes<HTMLButtonElement>.
| Keys | Does |
|---|---|
| Tab | Moves between enabled actions. |
| Enter or Space | Activates the focused action. |
<header class="rs-android-app-bar"><div class="rs-android-app-bar-navigation"><button class="rs-android-app-bar-action" type="button" aria-label="Go back">←</button></div><h2 class="rs-android-app-bar-title">Documents</h2><div class="rs-android-app-bar-actions"><button class="rs-android-app-bar-action" type="button" aria-label="More actions">⋯</button></div></header>