Skip to main content
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →
Physics & Gestures6 min read

Elastic Physics Pull-to-Refresh Gesture

Direct Definition & Architecture

An elastic pull-to-refresh interaction pairs continuous pointer drag gestures with logarithmic friction. As the user pulls downward, resistance increases non-linearly until reaching a trigger threshold, transitioning the state machine from Pulling to Refreshing.

Live .bexode720 × 520

Drag the list down and release past the threshold.

Live inputs

Technical Specifications

Scene format
One .exode file
Live inputs
label, tension, damping, accent
Motion
Drag, spring release, spinner
Gesture
Pointer drag inside the card

Interaction Phases

IdleThe list rests at the top of the card.
PullingDrag distance lifts the card while the indicator follows the pull.
RefreshingRelease past the threshold pins the indicator and spins it.
DoneThe spinner becomes a check, then the card settles back.

The scene keeps one Idle state. These phases are driven by its inputs and pointer events; the same values appear in the code below.

Use the scene

pull-to-refresh.jsx
import { ExodeUICanvas } from 'exodeui';

// pull-to-refresh.bexode goes in /public
export function PullToRefresh() {
  return (
    <ExodeUICanvas
      src="/examples/live/pull-to-refresh.bexode"
      fit="Layout"
      autoPlay
      interactive
      inputs={{
        label: 'Today',
        tension: 260,
        damping: 20,
        accent: '#ff4a1c',
        bg: '#f4f1ea',
        ink: '#171310',
      }}
      style={{ width: '100%', height: 520 }}
    />
  );
}

This snippet loads /examples/live/pull-to-refresh.bexode with the same inputs shown in the live stage.

Architectural Breakdown

Bad pull-to-refresh implementations lock the scroll position or feel linear and gummy.

ExodeUI applies physical resistance formulas where drag distance yields diminishing vertical displacement.

Once triggered, the indicator holds above the card while the spinner runs, then the card settles back when the refresh lands.

Frequently Asked Questions

Explore Related Motion Guides & Tooling

Build your next living interface today.

Design fluid physics and visual logic in ExodeUI and export directly to React, Swift, and Flutter.

Try for free