Skip to content
API reference

components/hold-button

Import
import * as api from "@fungi.computer/caps/components/hold-button";
Kind Export Description
type alias HoldButtonProps Props accepted by HoldButton.
constant HoldButton For an action nothing can undo: press and hold (pointer, Space or Enter) while a fill rises; let go early and it drops back; hold to the top and the action runs. Under reduced motion the fill rises in three steps.

HoldButtonPropstype alias

Section titled “HoldButtonProps”
Signature
type HoldButtonProps = object & Omit<ButtonProps, "children" | "onClick">;

Props accepted by HoldButton.

Name Type Description
children ReactNode -
onConfirm() () => void Runs once the button has been held for holdMs.
holdMs? number How long to hold, in milliseconds: a deliberate pause, not motion.
holdHint? string Spoken description of the gesture.

HoldButtonconstant

Section titled “HoldButton”
Signature
const HoldButton: ForwardRefExoticComponent<
object &
Omit<ButtonProps, "children" | "onClick"> &
RefAttributes<HTMLButtonElement>
>;

For an action nothing can undo: press and hold (pointer, Space or Enter) while a fill rises; let go early and it drops back; hold to the top and the action runs. Under reduced motion the fill rises in three steps.