Liquid Dial, animated React component
A floating action button whose actions bud out of it like liquid. The highlight is two blobs on different springs, so it pulls into a thread before wrapping the next action.
- Pro
- Inputs & Controls
- Spring
- Hover
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| actions | LiquidDialAction[] | Photo, Note, Voice memo, Link | Up to four actions ({ id, label, d }) laid out on an arc; d is SVG path data in a 24×24 box. |
| color | string | "#1d1d1f" | Blob colour. Left unset it is near-black, or #3a3a3c in dark mode. |
| accent | string | "#0071e3" | Highlight blob and focus ring colour. Left unset it is #0071e3, or #0a84ff in dark mode. |
| onSelect | (id: string) => void | undefined | Called with the action id when an action is picked. |
| autoplay | boolean | false | Opens and browses by itself until the user interacts. |