Toggle Sidebar B
AppearanceLight & dark mode D
Sling Button
Send button you pull back like a slingshot: the band stretches, a power arc arms it, and releasing fires the action with the flick's velocity.
Default
Drag the pad away from its seat until the arc fills, then let go. A plain tap or the Enter key sends too.
API Reference
SlingButton
| Prop | Type | Default | Description |
|---|---|---|---|
padColor | string | '#f5f5f5' | The pad fill. |
iconColor | string | '#18181b' | The pad content colour. |
accentColor | string | '#f5f5f5' | The power arc, the loaded band and the dot. |
wellColor | string | '#27272a' | The seat the pad rests in. |
bandColor | string | '#52525b' | The band before it loads. |
size | number | 56 | Pad diameter in pixels. Seat, hit area and dot follow. |
strokeWidth | number | 3 | Arc and band thickness in pixels. The band thins as it stretches. |
armAt | number | 48 | Pull distance in pixels that loads the send. |
maxPull | number | 160 | How far the band can stretch before it stops giving. |
launchSpeed | number | 2600 | Speed the band adds on release, in pixels per second. Sets how far the pad snaps through its seat. |
recoil | number | 0.2 | Bounce of the return spring. 0 stops dead. |
flight | number | 120 | How far the lead particle flies, in pixels. The rest scatter around that distance. |
particles | number | 14 | How many particles a launch throws. Each gets a random angle, reach, size, drift, speed and delay. 1 is a single dot, 0 is none. |
spread | number | 60 | The cone the burst fans across, in degrees, centred on the launch direction. |
axis | 'any' | 'horizontal' | 'vertical' | 'any' | Free pull, or one axis with a little give across it. |
tapSends | boolean | true | Whether a plain tap sends. Enter always does. |
disabled | boolean | false | Dims the pad and ignores input. |
ariaLabel | string | 'Send' | Accessible name of the button. |
| Event | Description |
|---|---|
send | Emitted on a loaded release, on a tap when tapSends is on, and on Enter or Space. |
| Slot | Description |
|---|---|
default | Pad content. Defaults to an arrow. |
Accessibility
Keyboard shortcuts and ARIA behavior.
| Shortcut | Description |
|---|---|
| Enter + Space | Sends. |
| Escape | Cancels a pull in progress. |
- A visually hidden hint, linked with aria-describedby, explains the drag. With prefers-reduced-motion the particles are dropped and the seat flashes instead.