# Pull to Refresh

Drag down from the top of any content past a threshold to trigger an async refresh, with a rotating spinner and a rubber-band release.

- Category: Core Elements
- Page: https://wunderui.com/components/pull-to-refresh
- Tier: Free

## Install

```bash
npx wunderui-cli add pull-to-refresh
```

## Import

```tsx
import { PullToRefresh } from "@/components/wunderui/pull-to-refresh"
```

## Minimal usage

Then use it:

```tsx
import { useState } from "react"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))

export function Notifications() {
  const [updated, setUpdated] = useState("Pull down to refresh")

  async function refresh() {
    await wait(1000)
    setUpdated("Updated just now")
  }

  return (
    <PullToRefresh onRefresh={refresh} className="h-64 bg-bg-page">
      <p role="status" className="p-4 text-sm">{updated}</p>
    </PullToRefresh>
  )
}
```

Expected result: You should see the text Pull down to refresh. Drag it down past about 140 px and release: a spinner turns for a second and the text reads Updated just now.

## Usage

```tsx
import { useState } from "react"
import { CircleCheck, FileText, MessageSquare, Receipt, Rocket, Ticket } from "lucide-react"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

const SEED = [
  { id: 1, icon: FileText, title: "Weekly report ready", minutes: 2 },
  { id: 2, icon: MessageSquare, title: "New comment on Q3 plan", minutes: 14 },
  { id: 3, icon: Receipt, title: "Invoice #1042 paid", minutes: 58 },
  { id: 4, icon: Rocket, title: "Deploy finished", minutes: 180 },
]

const INCOMING = [
  { icon: MessageSquare, title: "Nora Lindgren mentioned you in Roadmap" },
  { icon: CircleCheck, title: "Priya Raman approved the budget" },
  { icon: Ticket, title: "Tomás Ferreira closed 3 tickets" },
  { icon: FileText, title: "Monthly summary is ready" },
]

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const ago = (minutes: number) =>
  minutes === 0 ? "Just now" : minutes < 60 ? `${minutes} min ago` : `${Math.floor(minutes / 60)} h ago`

export function Example() {
  const [items, setItems] = useState(SEED)
  const [status, setStatus] = useState("Pull down to refresh")
  const [arrived, setArrived] = useState(0)

  async function refresh() {
    await wait(1000)
    const incoming = INCOMING[arrived % INCOMING.length]
    setArrived(arrived + 1)
    setItems((current) => [{ ...incoming, id: 100 + arrived, minutes: 0 }, ...current.map((item) => ({ ...item, minutes: item.minutes + 1 }))].slice(0, 4))
    setStatus("Updated just now")
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <div className="min-w-0">
          <p className="truncate text-sm font-semibold text-foreground">Notifications</p>
          <p role="status" className="truncate text-xs text-text-tertiary">{status}</p>
        </div>
      </div>
      <PullToRefresh onRefresh={refresh} className="h-[256px] bg-bg-page">
        <ul className="flex flex-col gap-2 p-2">
          {items.map((item) => {
            const Icon = item.icon
            return (
              <li key={item.id} className="flex items-center gap-3 rounded-md border border-border bg-card p-2">
                <span className="flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-indigo text-tint-text-indigo">
                  <Icon className="size-[18px]" strokeWidth={1.5} />
                </span>
                <span className="flex min-w-0 flex-col">
                  <span className="truncate text-sm font-medium text-foreground">{item.title}</span>
                  <span className="text-xs text-text-tertiary">{ago(item.minutes)}</span>
                </span>
              </li>
            )
          })}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

## When to use

### Use Pull to Refresh for

- A touch-first list or feed that people reload by hand, such as an inbox or a notification list
- Content that a server owns and that goes stale, such as figures or a status board
- A mobile layout where a Refresh button would take room from the list

### Use something else

- [Button](https://wunderui.com/components/button) for a refresh that must work with a keyboard or a screen reader, on its own or beside the list
- [Spinner](https://wunderui.com/components/spinner) for a load with no gesture, such as a page or a panel that is loading
- [Pagination](https://wunderui.com/components/pagination) for a long list that people move through page by page

## Keyboard

PullToRefresh is a pointer gesture. It adds no tab stop, key handling or announcement, so the keyboard route is a button that you provide.

| Key | Action |
|---|---|
| `Tab` or `Shift+Tab` | Moves focus through the controls inside the content and the Refresh button beside it. The wrapper itself is skipped. |
| `Enter` or `Space` | On your Refresh button: runs the same function as `onRefresh`. Show its pending state with `pending` on Button. |

The content area is not focusable and does not react to Arrow keys, Page Up or Page Down. Scrolling a list inside it works as usual.

## Behavior

What the gesture does with scrolling, taps, the request and motion.

- **When a pull starts:** A press becomes a pull only after it moves 8 px, mostly downward, with everything above scrolled to the top. Until then a tap stays a tap, and sideways or upward movement goes back to the browser.
- **Mouse and touch:** With a finger the page must be at its top too, because a finger scrolls the page. A mouse drag never scrolls, and only the primary pointer starts a pull, so a second finger is ignored.
- **Scrolling content:** Inside content that is scrolled down, the downward gesture scrolls it back up first. At the top the browser leaves the downward pull to the component but keeps horizontal scrolling and pinch zoom.
- **Resistance:** The content follows the pointer at half speed and stops at the maximum pull. The indicator fades in and turns with the progress, up to the threshold.
- **Release:** If the content has moved at least the threshold, it settles there, the spinner turns and the refresh runs. Below it, the content springs back; presses are ignored during a refresh.
- **Failure:** When the refresh fails, the spinner stops, the content springs back and the error handler is called, so the pull never stays locked. Without one the failure is swallowed, so tell people yourself.
- **Cancel:** If the browser takes the gesture, for example for a system swipe, the pointer is released and the content springs back without refreshing.
- **The click after a pull:** The release that ends a pull is not a click: it is swallowed once, so the row under the finger does not open. The next press clears it.
- **Motion:** While the pointer is down the content moves with it and has no transition. After release it settles with a slow ease, and the spinner turns while the refresh runs.
- **Reduced motion:** With reduced motion the content jumps to the threshold on release and back when the refresh ends, and the spinner stays a static icon. Pair it with a text status, since a static icon is not a signal.

## Anatomy

- `PullToRefresh`: A clipping box around your content. Give it a height and a background, since the indicator sits behind the content and shows as it moves down.
- `Indicator`: The spinner icon at the top of the box. It fades in and turns with the pull, then spins until the refresh settles.
- `Content`: The wrapper around your content that moves down with the pull. It takes the pointer events, lets the browser keep scrolling the content up, and shows a grab cursor, so text inside cannot be selected.

## Best practices

### Do

- Return the promise from the refresh handler. The spinner and the lock stay until it settles, so a slow request never looks finished.
- Pass an error handler and show the failure in text, such as Couldn't refresh. The component resets after a failure but shows nothing itself, and without a handler the failure is swallowed silently.
- Put a visible Refresh button beside the list that calls the same function. The gesture is pointer-based, with no keyboard route and no announcement.
- Announce the result in a status line, such as Updated just now. The component says nothing to assistive technology.
- Give the box a height, a background and content that fills it. The box clips what moves out of it, and its background shows behind the content during the pull.
- Keep the threshold at or below the maximum pull (defaults 70 and 110). The pull moves at half the finger speed, so people drag about twice the threshold.

### Don't

- Don't make the gesture the only way to refresh. Many people use a keyboard, a switch or a screen reader, and on a desktop mouse the drag is easy to miss.
- Don't use it for data that updates by itself. Show the new state instead and skip the gesture.
- Don't put text people should select inside the content. A drag must not select text, so the content blocks selection and nothing there can be copied.
- Don't expect a tap to work right after a pull. The click that ends a drag is swallowed on purpose, so the item under the finger is not opened.

## API reference

### PullToRefresh

| Prop | Type | Default | Description |
|---|---|---|---|
| children* | React.ReactNode |  | The content that is pulled down. Taps reach it normally; a drag that has begun does not click anything. |
| onRefresh* | () => void \| Promise<void> |  | Called once when the content is released past `threshold`. Return a promise: the spinner turns and the pull stays locked until it settles, also when it rejects or throws, which is reported to `onError`. |
| className | string |  | Extra classes for the outer box (`relative overflow-hidden`), for example a height and a background such as `h-64 bg-bg-page`. |
| maxPull | number | 110 | The most the content can move, in px. The pull moves at half the pointer speed, so this takes about twice as much dragging. Keep it at or above `threshold`. Defaults to 110. |
| onError | (error: unknown) => void |  | Called with the error when `onRefresh` throws or its promise rejects. The indicator has already reset. Optional: without it the failure is swallowed, so show it in your own UI. |
| threshold | number | 70 | How far the content must have moved, in px, before a release refreshes. It is also the height of the indicator area and where the content rests while refreshing. Defaults to 70. |

## Examples

### Result: new items, nothing new or a failed request

```tsx
import { useState } from "react"
import { CircleCheck, FileText, MessageSquare, Receipt, RefreshCw, Rocket, Ticket } from "lucide-react"
import { Button } from "@/components/ui/button"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

const SEED = [
  { id: 1, icon: FileText, title: "Weekly report ready", minutes: 2 },
  { id: 2, icon: MessageSquare, title: "New comment on Q3 plan", minutes: 14 },
  { id: 3, icon: Receipt, title: "Invoice #1042 paid", minutes: 58 },
  { id: 4, icon: Rocket, title: "Deploy finished", minutes: 180 },
]

const INCOMING = [
  { icon: MessageSquare, title: "Nora Lindgren mentioned you in Roadmap" },
  { icon: CircleCheck, title: "Priya Raman approved the budget" },
  { icon: Ticket, title: "Tomás Ferreira closed 3 tickets" },
  { icon: FileText, title: "Monthly summary is ready" },
]

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const ago = (minutes: number) =>
  minutes === 0 ? "Just now" : minutes < 60 ? `${minutes} min ago` : `${Math.floor(minutes / 60)} h ago`

export function Example() {
  const [items, setItems] = useState(SEED)
  const [status, setStatus] = useState("Updated 2 min ago")
  const [busy, setBusy] = useState(false)
  const [arrived, setArrived] = useState(0)

  async function refresh() {
    if (busy) return
    setBusy(true)
    await wait(1000)
    const incoming = INCOMING[arrived % INCOMING.length]
    setArrived(arrived + 1)
    setItems((current) => [{ ...incoming, id: 100 + arrived, minutes: 0 }, ...current.map((item) => ({ ...item, minutes: item.minutes + 1 }))].slice(0, 4))
    setStatus("Updated just now")
    setBusy(false)
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <div className="min-w-0">
          <p className="truncate text-sm font-semibold text-foreground">Notifications</p>
          <p role="status" className="truncate text-xs text-text-tertiary">{status}</p>
        </div>
        <Button variant="plain" size="sm" pending={busy} onClick={refresh}>
          <RefreshCw data-icon="inline-start" strokeWidth={1.5} />
          Refresh
        </Button>
      </div>
      <PullToRefresh onRefresh={refresh} className="h-[256px] bg-bg-page">
        <ul className="flex flex-col gap-2 p-2">
          {items.map((item) => {
            const Icon = item.icon
            return (
              <li key={item.id} className="flex items-center gap-3 rounded-md border border-border bg-card p-2">
                <span className="flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-indigo text-tint-text-indigo">
                  <Icon className="size-[18px]" strokeWidth={1.5} />
                </span>
                <span className="flex min-w-0 flex-col">
                  <span className="truncate text-sm font-medium text-foreground">{item.title}</span>
                  <span className="text-xs text-text-tertiary">{ago(item.minutes)}</span>
                </span>
              </li>
            )
          })}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

### Trigger: the drag alone, or with a Refresh button

```tsx
import { useState } from "react"
import { CircleCheck, FileText, MessageSquare, Receipt, Rocket, Ticket } from "lucide-react"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

const SEED = [
  { id: 1, icon: FileText, title: "Weekly report ready", minutes: 2 },
  { id: 2, icon: MessageSquare, title: "New comment on Q3 plan", minutes: 14 },
  { id: 3, icon: Receipt, title: "Invoice #1042 paid", minutes: 58 },
  { id: 4, icon: Rocket, title: "Deploy finished", minutes: 180 },
]

const INCOMING = [
  { icon: MessageSquare, title: "Nora Lindgren mentioned you in Roadmap" },
  { icon: CircleCheck, title: "Priya Raman approved the budget" },
  { icon: Ticket, title: "Tomás Ferreira closed 3 tickets" },
  { icon: FileText, title: "Monthly summary is ready" },
]

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const ago = (minutes: number) =>
  minutes === 0 ? "Just now" : minutes < 60 ? `${minutes} min ago` : `${Math.floor(minutes / 60)} h ago`

export function Example() {
  const [items, setItems] = useState(SEED)
  const [status, setStatus] = useState("Pull down to refresh")
  const [arrived, setArrived] = useState(0)

  async function refresh() {
    await wait(1000)
    const incoming = INCOMING[arrived % INCOMING.length]
    setArrived(arrived + 1)
    setItems((current) => [{ ...incoming, id: 100 + arrived, minutes: 0 }, ...current.map((item) => ({ ...item, minutes: item.minutes + 1 }))].slice(0, 4))
    setStatus("Updated just now")
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <div className="min-w-0">
          <p className="truncate text-sm font-semibold text-foreground">Notifications</p>
          <p role="status" className="truncate text-xs text-text-tertiary">{status}</p>
        </div>
      </div>
      <PullToRefresh onRefresh={refresh} className="h-[256px] bg-bg-page">
        <ul className="flex flex-col gap-2 p-2">
          {items.map((item) => {
            const Icon = item.icon
            return (
              <li key={item.id} className="flex items-center gap-3 rounded-md border border-border bg-card p-2">
                <span className="flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-indigo text-tint-text-indigo">
                  <Icon className="size-[18px]" strokeWidth={1.5} />
                </span>
                <span className="flex min-w-0 flex-col">
                  <span className="truncate text-sm font-medium text-foreground">{item.title}</span>
                  <span className="text-xs text-text-tertiary">{ago(item.minutes)}</span>
                </span>
              </li>
            )
          })}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

### Content: a list that fits or one that scrolls

```tsx
import { useState } from "react"
import { CircleCheck, FileText, MessageSquare, Receipt, Rocket, Ticket } from "lucide-react"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

const SEED = [
  { id: 1, icon: FileText, title: "Weekly report ready", minutes: 2 },
  { id: 2, icon: MessageSquare, title: "New comment on Q3 plan", minutes: 14 },
  { id: 3, icon: Receipt, title: "Invoice #1042 paid", minutes: 58 },
  { id: 4, icon: Rocket, title: "Deploy finished", minutes: 180 },
]

const INCOMING = [
  { icon: MessageSquare, title: "Nora Lindgren mentioned you in Roadmap" },
  { icon: CircleCheck, title: "Priya Raman approved the budget" },
  { icon: Ticket, title: "Tomás Ferreira closed 3 tickets" },
  { icon: FileText, title: "Monthly summary is ready" },
]

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const ago = (minutes: number) =>
  minutes === 0 ? "Just now" : minutes < 60 ? `${minutes} min ago` : `${Math.floor(minutes / 60)} h ago`

export function Example() {
  const [items, setItems] = useState(SEED)
  const [status, setStatus] = useState("Pull down to refresh")
  const [arrived, setArrived] = useState(0)

  async function refresh() {
    await wait(1000)
    const incoming = INCOMING[arrived % INCOMING.length]
    setArrived(arrived + 1)
    setItems((current) => [{ ...incoming, id: 100 + arrived, minutes: 0 }, ...current.map((item) => ({ ...item, minutes: item.minutes + 1 }))].slice(0, 4))
    setStatus("Updated just now")
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <div className="min-w-0">
          <p className="truncate text-sm font-semibold text-foreground">Notifications</p>
          <p role="status" className="truncate text-xs text-text-tertiary">{status}</p>
        </div>
      </div>
      <PullToRefresh onRefresh={refresh} className="h-[256px] bg-bg-page">
        <ul className="flex flex-col gap-2 p-2">
          {items.map((item) => {
            const Icon = item.icon
            return (
              <li key={item.id} className="flex items-center gap-3 rounded-md border border-border bg-card p-2">
                <span className="flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-indigo text-tint-text-indigo">
                  <Icon className="size-[18px]" strokeWidth={1.5} />
                </span>
                <span className="flex min-w-0 flex-col">
                  <span className="truncate text-sm font-medium text-foreground">{item.title}</span>
                  <span className="text-xs text-text-tertiary">{ago(item.minutes)}</span>
                </span>
              </li>
            )
          })}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

## In context

### Inbox: pull to check for new mail

A new message arrives at the top and the oldest drops off, so the list keeps its height. The Refresh button runs the same function for keyboard and screen reader users.

```tsx
import { useState } from "react"
import { RefreshCw } from "lucide-react"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"

type Mail = { id: number; from: string; initials: string; color: "indigo" | "blue" | "purple" | "green"; subject: string; minutes: number }

const SEED: Mail[] = [
  { id: 1, from: "Nora Lindgren", initials: "NL", color: "indigo", subject: "Q3 roadmap review", minutes: 4 },
  { id: 2, from: "Daniel Okafor", initials: "DO", color: "blue", subject: "Invoice #1042", minutes: 26 },
  { id: 3, from: "Priya Raman", initials: "PR", color: "purple", subject: "Budget approval", minutes: 95 },
  { id: 4, from: "Tomás Ferreira", initials: "TF", color: "green", subject: "Support rota", minutes: 190 },
]

const INCOMING = [
  { from: "Maya Kessler", initials: "MK", color: "indigo", subject: "Design tokens handoff" },
  { from: "Nora Lindgren", initials: "NL", color: "indigo", subject: "Launch checklist" },
  { from: "Daniel Okafor", initials: "DO", color: "blue", subject: "Renewal call" },
]

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const ago = (minutes: number) =>
  minutes === 0 ? "Just now" : minutes < 60 ? `${minutes} min ago` : `${Math.floor(minutes / 60)} h ago`

export function Example() {
  const [mails, setMails] = useState(SEED)
  const [arrived, setArrived] = useState(0)
  const [busy, setBusy] = useState(false)

  async function refresh() {
    if (busy) return
    setBusy(true)
    await wait(1000)
    const incoming = INCOMING[arrived % INCOMING.length]
    setArrived(arrived + 1)
    setMails((current) => [{ ...incoming, id: 100 + arrived, minutes: 0 }, ...current.map((mail) => ({ ...mail, minutes: mail.minutes + 1 }))].slice(0, 4))
    setBusy(false)
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <p className="truncate text-sm font-semibold text-foreground">Inbox</p>
        <Button variant="plain" size="sm" pending={busy} onClick={refresh}>
          <RefreshCw data-icon="inline-start" strokeWidth={1.5} />
          Refresh
        </Button>
      </div>
      <PullToRefresh onRefresh={refresh} className="h-[259px] bg-bg-page">
        <ul className="divide-y divide-border bg-card">
          {mails.map((mail) => (
            <li key={mail.id} className="flex items-center gap-3 px-4 py-3">
              <Avatar color={mail.color}>
                <AvatarFallback>{mail.initials}</AvatarFallback>
              </Avatar>
              <span className="flex min-w-0 flex-1 flex-col">
                <span className="flex items-baseline justify-between gap-2">
                  <span className="truncate text-sm font-medium text-foreground">{mail.from}</span>
                  <span className="shrink-0 text-xs text-text-tertiary">{ago(mail.minutes)}</span>
                </span>
                <span className="truncate text-sm text-text-secondary">{mail.subject}</span>
              </span>
            </li>
          ))}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

### Store figures: pull to update the numbers

Each refresh moves the figures and their change chips to the next state. The refund rate falls, which is good, so its chip points down and stays green.

```tsx
import { useState } from "react"
import { RefreshCw } from "lucide-react"
import { Button } from "@/components/ui/button"
import { PullToRefresh } from "@/components/ui/pull-to-refresh"
import { TrendChip } from "@/components/ui/trend-chip"

const SNAPSHOTS = [
  { revenue: ["$48,200", "+4.2%"], orders: ["1,284", "+12.6%"], refunds: ["2.1%", "-0.4%"] },
  { revenue: ["$48,960", "+5.9%"], orders: ["1,301", "+14.1%"], refunds: ["2.0%", "-0.5%"] },
  { revenue: ["$49,410", "+6.9%"], orders: ["1,322", "+15.9%"], refunds: ["1.9%", "-0.6%"] },
] as const

const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))

export function Example() {
  const [step, setStep] = useState(0)
  const [busy, setBusy] = useState(false)
  const [status, setStatus] = useState("Updated 2 min ago")
  const snapshot = SNAPSHOTS[step]
  const rows = [
    { label: "Revenue", value: snapshot.revenue, sentiment: "auto" },
    { label: "Orders", value: snapshot.orders, sentiment: "auto" },
    { label: "Refund rate", value: snapshot.refunds, sentiment: "positive" },
  ]

  async function refresh() {
    if (busy) return
    setBusy(true)
    await wait(1000)
    setStep((current) => (current + 1) % SNAPSHOTS.length)
    setStatus("Updated just now")
    setBusy(false)
  }

  return (
    <div className="flex w-full max-w-sm flex-col overflow-hidden rounded-xl border border-border bg-card">
      <div className="flex h-[52px] items-center justify-between gap-3 border-b border-border px-4">
        <div className="min-w-0">
          <p className="truncate text-sm font-semibold text-foreground">Store today</p>
          <p role="status" className="truncate text-xs text-text-tertiary">{status}</p>
        </div>
        <Button variant="plain" size="sm" pending={busy} onClick={refresh}>
          <RefreshCw data-icon="inline-start" strokeWidth={1.5} />
          Refresh
        </Button>
      </div>
      <PullToRefresh onRefresh={refresh} className="bg-bg-page">
        <ul className="divide-y divide-border bg-card px-4">
          {rows.map((row) => (
            <li key={row.label} className="flex items-center justify-between gap-4 py-3">
              <span className="text-sm text-text-secondary">{row.label}</span>
              <span className="flex items-center gap-3">
                <span className="text-sm font-semibold tabular-nums text-foreground">{row.value[0]}</span>
                <TrendChip value={row.value[1]} direction={row.value[1].startsWith("-") ? "down" : "up"} sentiment={row.sentiment} />
              </span>
            </li>
          ))}
        </ul>
      </PullToRefresh>
    </div>
  )
}
```

## For AI agents

`get_component("pull-to-refresh")`

Hand your agent this page as Markdown or the WunderUI MCP server, not a screenshot.
