# Gooey Refresh

Pull-to-refresh for a list: a drop of goo stretches out of the top edge, pinches off at the threshold and wobbles round, thins into a spinning ring while it loads, then bursts into droplets that fall into the list and open up as the new rows.

- Page and source: https://uibrik.com/components/gooey-refresh
- Install (Pro, needs a license key, see https://uibrik.com/docs/pro): `npx shadcn@latest add @uibrik-pro/gooey-refresh`
- Packages: none beyond React
- Import: `import { GooeyRefresh } from "@/components/uibrik/gooey-refresh/gooey-refresh"`

Where to use the Gooey Refresh React component:

- **Feeds and inboxes**: Pulling a feed for new posts or mail shows each new item arriving as its own droplet. Pairs with [Swipe Rows](https://uibrik.com/components/swipe-rows) and [Notification Center](https://uibrik.com/components/notification-center).
- **Activity and logs**: A pull on an activity list makes fetching the latest events feel physical, with no button to find. Pairs with [Activity Log](https://uibrik.com/components/activity-log) and [Event Feed](https://uibrik.com/components/event-feed).
- **Mobile web apps**: Touch, mouse drag and trackpad all pull, so one list works in a phone web view and on desktop.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| threshold | `number` | `72` | How far the list travels before the drop snaps off. |
| maxPull | `number` | `150` | Longest the list can be pulled; the pull gets heavier toward it. |
| minDuration | `number` | `900` | Shortest time the spinner shows, so a fast refresh still reads. |
| color | `string` | `""` | Blob colour; empty uses the text colour. |
| gap | `number` | `8` | Space between rows. |
| fade | `number` | `56` | Soft fade where rows run off the bottom edge; 0 turns it off. |
| wheel | `boolean` | `true` | Pull with the mouse wheel or trackpad when the list is at the top. |
| items | `T[] (T extends { id: string })` |  | Rows to show. Add new ones to the start inside onRefresh. |
| renderItem | `(item: T, index: number) => ReactNode` |  | Renders one row. |
| onRefresh | `() => Promise<void> \| void` |  | Runs when a pull is released past the threshold. Rows whose ids are new when it settles fall in as droplets. |
| ref | `Ref<{ refresh(): void }>` |  | refresh() plays the whole pull, for a button or a first-visit hint. |
| aria-label | `string` | `"Feed"` | Accessible name for the list. |
| className | `string` |  | Classes for the wrapper. Give it a height; the list scrolls inside. |
| contentClassName | `string` |  | Classes for the element holding the rows, such as padding. |
