Skip to content
API reference

components/send-action

Import
import * as api from "@fungi.computer/caps/components/send-action";
Kind Export Description
type alias SendActionState Where a composer’s send action is: nothing to send, ready, or working.
type alias SendActionProps Props accepted by SendAction.
constant SendAction A composer’s one send key, on the Caps keycap. Empty, it rests disabled; given something to send it wakes with a small pop; sending, its arrow launches away and a working indicator (or, with onStop, a stop square) takes its place in the same key; when the work ends the arrow drops back in. It never grows a second button. All timing comes from the theme’s motion tokens, and reduced motion keeps short fades only.

SendActionStatetype alias

Section titled “SendActionState”
Signature
type SendActionState = "empty" | "ready" | "busy";

Where a composer’s send action is: nothing to send, ready, or working.


SendActionPropstype alias

Section titled “SendActionProps”
Signature
type SendActionProps = object &
Omit<
KeycapButtonProps,
| "label"
| "icon"
| "readout"
| "shortcut"
| "pressed"
| "expanded"
| "aria-label"
>;

Props accepted by SendAction.

Name Type Description
state SendActionState -
aria-label string The accessible name while it sends, such as “Generate image”.
onStop()? () => void Offered while busy: the arrow becomes a stop square that calls this.
stopLabel? string The accessible name of the stop action.
iconSize? number Glyph size in pixels.

SendActionconstant

Section titled “SendAction”
Signature
const SendAction: ForwardRefExoticComponent<
object &
Omit<
KeycapButtonProps,
| "aria-label"
| "label"
| "icon"
| "readout"
| "expanded"
| "pressed"
| "shortcut"
> &
RefAttributes<HTMLButtonElement>
>;

A composer’s one send key, on the Caps keycap. Empty, it rests disabled; given something to send it wakes with a small pop; sending, its arrow launches away and a working indicator (or, with onStop, a stop square) takes its place in the same key; when the work ends the arrow drops back in. It never grows a second button. All timing comes from the theme’s motion tokens, and reduced motion keeps short fades only.