PullToAction Component

A component that implements pull-to-refresh functionality for mobile and touch devices. It provides visual feedback during the pull action and handles the refresh operation.

Example

<PullToAction
onRefresh={async () => {
await fetchNewData();
}}
configuration={{
pullDownThreshold: 120,
dragContent: true
}}
>
<YourContent />
</PullToAction>

Hierarchy

Constructors

Properties

state: PullToActionState = ...

Component state

Methods

  • Handles the touch end event Triggers refresh if pull threshold is met

    Returns Promise<void>

  • Handles the touch move event Calculates pull distance and updates visual feedback

    Parameters

    • e: TouchEvent<Element>

      The touch move event

    Returns void

  • Handles the touch start event Stores the initial Y position of the touch

    Parameters

    • e: TouchEvent<Element>

      The touch start event

    Returns void

  • Renders the PullToAction component

    Returns Element

    The rendered component