Pass your logo as paths. Place ScatterMarkTrigger inside, so a keyboard can scatter it too.
brand-mark.tsx
ScatterMark
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| mark | — | The logo that the bearings form: filled paths in the units of a viewBox. | |
| spacing | number | 14 | The distance between bearings at full width, in px. A large logo widens it. Default 14. |
| padding | number | 32 | The free space around the logo, in px. Default 32. |
| depth | number | 50 | How far the bearings may spread in depth after a scatter, in px. Default 50. |
| burst | number | 1100 | The speed of the scatter, in px per second. Default 1100. |
| hold | number | 1.6 | The seconds the bearings lie loose before they fly back. Default 1.6. |
| return | number | 0.9 | The seconds the flight back takes to reach full pull. Default 0.9. |
| auto | boolean | true | False: the bearings stay on the floor after a scatter. Default true. |
| pull | number | 110 | How hard the logo pulls its bearings back. Default 110. |
| gravity | number | 1700 | How fast loose bearings fall, in px per second squared. Default 1700. |
| bounce | number | 0.5 | The share of speed a bearing keeps in a hit, 0 to 1. Default 0.5. |
| pointer | number | 90 | How far the pointer parts the bearings, in px. Default 90. |
| pointer | number | 26_000 | How hard the pointer parts the bearings, in px per second squared. Default 26000. |
| colors | readonly string[] | STEEL_COLORS | The bearing colors, any CSS color. |
| roughness | number | 0.16 | The polish: 0 is a mirror. Default 0.16. |
| metalness | number | 1 | The metal share of the surface, 0 to 1. Default 1. |
| ambient | number | 1.15 | The room reflected in the steel. Default 1.15. |
| key | number | 0.9 | The key light from the upper left. Default 0.9. |
| shadow | string | "oklch(0.2 0 0)" | The color of the shadows on the page. Default a near black. |
| shadow | number | 0.16 | The strength of the shadows on the page, 0 to 1. Default 0.16. |
| seed | number | 9 | The seed of the start places and the scatter. Default 9. |
| on | — | Gets frame numbers about twice a second while the bearings move. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ScatterMarkTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
ScatterMarkAssemble
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| EnterorSpace | On Scatter, scatters the logo from its middle. On Assemble, calls the bearings back at once. |
|---|
Built with
Installs with Scatter Mark
- Components
- Button





