Get started
Forms
- Label
- Icon label
- Field
- Form
- Frontmatter form
- Questionnaire
- Input
- Input group
- Input OTP
- Password input
- Password strength
- Code input
- Number field
- Tag input
- Textarea
- Checkbox
- Radio group
- Language toggle group
- Emoji appearance toggle group
- Emoji picker
- Avatar picker
- AI provider picker
- Select
- Native select
- Combobox
- Language combobox
- Slider
- Calendar
- Switch
Display
- Alert
- Avatar
- Badge
- Card
- AI provider card
- Model info card
- Model list
- Empty
- Item
- Tree item
- File tree
- Icon media
- File type icon
- Font preview
- Image preview
- Kbd
- Table
- Data table
- Data table column header
- Chart
- Code Block
- Code card
- Markdown view
- Attachment
- Bubble
- Marker
- Message
- Chat message
- Chat suggestion item
- Message scroller
- Trace
- Progress
- Spinner
- Sonner
- Toast
- Unsaved changes toolbar
- Unsaved indicator
- Status indicator
- Permission card
- Separator
- Skeleton
- Animated grid pattern
- Meteors
Layout
A floating card-color toolbar shell, announced as a toolbar around the tools the caller composes.
Installation#
bash
pnpm dlx shadcn@latest add @zui/floating-toolbarThe CLI writes components/layout/floating-toolbar.tsx and installs Utils.
Usage#
tsx
import { FloatingToolbar } from '@/components/layout/floating-toolbar';tsx
<FloatingToolbar aria-label="Text formatting" className="absolute bottom-3 self-center z-20">
<Button variant="ghost" size="icon-sm" aria-label="Bold">
<Icon as={Bold} />
</Button>
</FloatingToolbar>Use it for the tool palette that floats over an editor canvas. Its placement is your className.
API reference#
FloatingToolbar#
Takes every prop of React Native's View. A row of tools on the card colour, rounded, with a hairline border and
the shadow of the style's menus, announced as a toolbar; give it an aria-label.
Differences from the web#
- The web blurs what lies under the bar with
backdrop-blur-sm; neither engine blurs a view's backdrop, so the bar is drawn on the card colour at 95% alone. - The web's ring, a box-shadow a device has no counterpart of, is drawn as a border as wide, in the style's ring colour.
- The web's
pointer-events-autois not set: on a device, a parent laid over a canvas lets presses through to its children withpointerEvents="box-none"instead. - The web's
data-slotattribute is not set; a View takes no data attributes.