Put the indicator and the content in the root, and give the root a height.
inbox.tsx
PullToRefresh
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| on | — | Runs on a refresh. Return a promise: the spinner stays until it settles. | |
| on | — | Gets what onRefresh threw or rejected with. Without it, the error goes to reportError. | |
| threshold | number | PULL_TO_REFRESH.threshold | The pull in px that arms a refresh. Default 88. |
| disabled | boolean | false | No pull and no refresh. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
PullToRefreshIndicator
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
PullToRefreshLabel
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| state | "armed""pulling""refreshing" | — | The state that shows this label. Put one label per state you want words for. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
PullToRefreshContent
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
PullToRefreshTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| Tab | Moves to PullToRefreshTrigger, when the content has one. |
|---|---|
| EnterorSpace | Runs the refresh from the trigger. The button is busy until it ends. |
Built with
Installs with Pull to Refresh
- Components
- Button





