Create a note
- Project notes
A Material floating action button with an optional extended text label.
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 { AndroidFab, Icon } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/android-fab.
npx @noorddev/vlak-cli add android-fab
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-fab.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 { AndroidFab, Icon } from "@noorddev/vlak-react";
<AndroidFab icon={<Icon name="plus" size={24} />} onClick={createDocument}>New document</AndroidFab>| Prop | Type | Default | Description |
|---|---|---|---|
iconrequired | ReactNode |
Also accepts ButtonHTMLAttributes<HTMLButtonElement>.
| Keys | Does |
|---|---|
| Tab | Focuses the enabled action. |
| Enter or Space | Activates the action. |
<button class="rs-android-fab rs-android-fab-extended" type="button"><span class="rs-android-fab-icon" aria-hidden="true">+</span>New document</button>