Morph Cursor, animated React component
An iPad-style pointer for a panel: a soft dot that melts into the shape of whatever you can press, sits behind it as a highlight while the element leans toward you, and turns into a caret over text. The system cursor is hidden only inside the panel.
- Pro
- Motion Effects
- Hover
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Move the pointer around.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| icons | MorphCursorIcon[] | DEFAULT_MORPH_ICONS | Icon buttons in the top row, each { id, label, path } with a 24×24 path. |
| buttonLabel | string | "Start a project" | Label of the pill button. |
| inputLabel | string | "Project name" | Accessible name of the text field. |
| defaultInputValue | string | "Spring launch, website and email" | Starting text in the field. |
| cards | MorphCursorCard[] | DEFAULT_MORPH_CARDS | Tiles under the field, each { id, label, gradient }. |
| accent | string | "#0071e3" | Colour of the caret over the field and of the focus rings. |
| onAction | (id: string) => void | — | Called with an icon id, "button" for the pill, or a card id when one is pressed. |
| hint | string | "Move the pointer around." | Caption at the bottom of the panel. An empty string hides it. |
| autoplay | boolean | false | Tours the pointer over every target until someone moves over the panel. |
| className | string | — | Extra classes for the panel. |