Floating actions


Install
npx shadcn add https://ui.klarhimmel.com/r/floating-actions.jsonDetailsAbout, usage, props and more
A pill with a quiet link and the main action, centred on its own band so the one thing to do stays in reach. Sits in the flow of its section, never fixed over the page.
Import
Import
- banner/floating-actions
- About
- A pill with a quiet link and the main action, centred on its own band so the one thing to do stays in reach. Sits in the flow of its section, never fixed over the page. Empty secondary label drops the link.
- Category
- Announcement bars and the cookie notice. New project? Set it up once: /get-started/installation.
Notes
When to use it
A small pill with one quiet link and one filled button, centred on its own band so the single thing to do stays in reach. Use cta-minimal when the closing step needs a heading and a sentence around it.
Writing for it
- Give the filled button the action you most want taken and the quiet link the softer alternative, such as reading more before booking. - Leave the secondary label empty to drop the link, and the pill shrinks to the button alone. - The group label is read by screen readers and never drawn, so write it as what the pair of actions is for.
Watch out for
It sits in the flow of its section and is never fixed over the page, so it does not follow the visitor while they scroll. A page that needs a sticky bar has to add that outside the block.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | 'Name what these actions are for' | Text, up to 40 characters. |
secondary | Link | {…} | See the type. |
primary | Link | {…} | See the type. |