[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116813":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":38,"updatedAt":39,"readmeContent":40,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":41,"lastSyncTime":42,"discoverSource":43},116813,"dissolve","rs-4\u002Fdissolve","rs-4","Animated components for React Native and React. Copy them into your project or let your agent build with them. npx dissolve-ui add","https:\u002F\u002Fdissolve.rselmi.com",null,"TypeScript",72,6,52,0,3,8,14,53.34,"MIT License",false,"main",[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"animation","expo","ios","micro-interactions","nativewind","nextjs","particles","react","react-native","reanimated","shadcn","skia","typescript","ui-components","2026-11-23 19:26:33","2026-11-23 20:39:50","# dissolve\n\nAn animation library for React Native. Turn any view into dust: a Skia snapshot, cut into grains,\nanimated by Reanimated 4 on the UI thread. Its ready-made components also run on the web, as React\ncomponents with the same props.\n\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fdissolve-ui.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdissolve-ui)\n[![CI](https:\u002F\u002Fgithub.com\u002Frs-4\u002Fdissolve\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frs-4\u002Fdissolve\u002Factions\u002Fworkflows\u002Fci.yml)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fdissolve-ui.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdissolve-ui)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Expo SDK 57](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FExpo%20SDK-57-000020.svg)](https:\u002F\u002Fexpo.dev)\n\nPut a ref on any component, call `dissolve()`, and it dissolves, melts, peels or rebuilds itself.\nIt works on any view, not a specific widget. iOS and Android, works with Expo (runs in Expo Go).\n\nHow it works: the view is snapshotted with Skia `makeImageFromView`, cut into grains drawn with one\n`\u003CAtlas>`, and animated on the UI thread (Reanimated 4, react-native-worklets). Every grain is\ncomputed in a single reaction pass per frame, idle grains are skipped, and grain counts are capped\nat 6000 per burst.\n\n## Install\n\n```sh\nnpx expo install dissolve-ui @shopify\u002Freact-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics\n```\n\nThe demo app in this repo imports the source directly through the `@\u002Fdissolve` path alias.\n\nKnown good versions (from `package.json`): Expo SDK 57, React Native 0.86, React 19.2,\n`@shopify\u002Freact-native-skia` 2.6, `react-native-reanimated` 4.5, `react-native-worklets` 0.10,\n`react-native-gesture-handler` 2.32. Expo's Babel preset already adds the worklets plugin; a bare\nReact Native app needs `'react-native-worklets\u002Fplugin'` in `babel.config.js`.\n\n## Setup\n\nWrap the app once in `\u003CDissolveProvider>`, above the navigator so effects survive a screen pop\n(see `app\u002F_layout.tsx`). The provider renders a full screen, `pointerEvents=\"none\"` overlay where\ngrains are drawn, and skips effects when reduced motion is on.\n\n```tsx\n\u002F\u002F app\u002F_layout.tsx\nimport { Stack } from 'expo-router';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\nimport { DissolveProvider } from '@\u002Fdissolve';\n\nexport default function Layout() {\n  return (\n    \u003CGestureHandlerRootView style={{ flex: 1 }}>\n      \u003CDissolveProvider>\n        \u003CStack \u002F>\n      \u003C\u002FDissolveProvider>\n    \u003C\u002FGestureHandlerRootView>\n  );\n}\n```\n\n## Quick start\n\n```tsx\nimport { Pressable, View } from 'react-native';\nimport { useDissolve } from '@\u002Fdissolve';\n\nfunction Row({ item, onRemove }) {\n  const { ref, dissolving, dissolve } = useDissolve();\n  return (\n    \u003CPressable\n      onPress={async () => {\n        await dissolve({ preset: 'sand' });\n        onRemove(item.id); \u002F\u002F the space can be reclaimed\n      }}\n    >\n      \u003CView ref={ref} collapsable={false} style={{ opacity: dissolving ? 0 : 1 }}>\n        {\u002F* row content *\u002F}\n      \u003C\u002FView>\n    \u003C\u002FPressable>\n  );\n}\n```\n\nHide the original with `opacity: dissolving ? 0 : 1` and remove it from state after the `await`.\n\n## Variants\n\nCommon options for every atlas preset: `origin` (`'left' | 'right' | 'top' | 'bottom' | 'center' | { x, y }`),\n`direction` (`'out' | 'in'`, any exit plays backwards as an entrance), `grain`, `duration`, `haptics`,\n`field: 'cascade'` with `rows`, and free knobs `n`.\n\n### Classic presets\n\n| Preset | Usage |\n|---|---|\n| `dust` | `dissolve({ preset: 'dust' })` blown away to the right |\n| `sand` | `dissolve({ preset: 'sand' })` grains pour down with gravity |\n| `ember` | `dissolve({ preset: 'ember' })` burns from the edge, rises as sparks |\n| `pixel` | `dissolve({ preset: 'pixel' })` blocky stepped collapse |\n| `vortex` | `dissolve({ preset: 'vortex' })` spirals into the center |\n\n### More variants\n\n| Variant | Usage |\n|---|---|\n| `snap` | `dissolve({ preset: 'snap', origin: { x, y } })` bursts from the touch point, `n: [push]` |\n| `fling` | `dissolve({ preset: 'fling', velocity: { x: e.velocityX, y: e.velocityY } })` follows the swipe |\n| `stream` | `dissolve({ preset: 'stream', to: trashRef, onArrive })` flies into a target |\n| `gather` | `\u003CDissolveIn preset=\"gather\">{card}\u003C\u002FDissolveIn>` converges from a cloud |\n| `rain` | `\u003CDissolveIn preset=\"rain\" delay={i * 40}>{row}\u003C\u002FDissolveIn>` falls and settles, bottom first |\n| `print` | `useAppear().appear({ preset: 'print' })` printed line by line |\n| `charge` | `const { ref, pressHandlers, style } = useDissolveHold({ onCommit })` hold to heat, bursts at full charge |\n| scrub | `const { ref, gesture, style } = useDissolveScrub({ preset: 'dust', onCommit })` finger driven, reversible |\n| `peel` | `const { ref, gesture, style } = useDissolvePeel({ onCommit })` grab near any corner or edge and peel it off like a sticker, or `dissolve({ preset: 'peel' })` |\n| `melt` | `dissolve({ preset: 'melt' })` melts down like a liquid, drips merge and pinch off (Skia gooey layer) |\n| cascade | `dissolve({ preset: 'dust', field: 'cascade', rows: [0, 72, 144] })` list rows leave in a diagonal wave |\n| screen | `useDissolveScreen().dissolveScreen({ preset: 'sand', then: () => router.back() })` full screen |\n| `shatter` | `dissolve({ preset: 'shatter', origin: { x, y }, n: [220] })` glass shards from the impact |\n| `morph` | `const { refA, refB, styleA, styleB, morph } = useDissolveMorph(); await morph()` A becomes B |\n\nThe example app in `app\u002F` has one screen per effect (`app\u002Feffect\u002F[name].tsx`), one per component\n(`app\u002Fdemo\u002F[name].tsx`) and a playground with every option.\n\n## Components\n\nReady-made components ship the shadcn way: the CLI copies their source into your project, you own it\nand restyle it with classNames. They read the dissolve theme tokens, so light and dark follow the\nsystem automatically. One CLI for React Native and React on the web:\n\n```sh\nnpx dissolve-ui init                  # asks the platform, saves it in dissolve.json, theme tokens\nnpx dissolve-ui add swipe-to-delete   # one or more components, for that platform\nnpx dissolve-ui list                  # everything available, and where it runs\n```\n\nAlready on shadcn? Every component is also a shadcn registry item, installed with its own CLI:\n\n```sh\nnpx shadcn@latest add https:\u002F\u002Fdissolve.rselmi.com\u002Fr\u002Fscratch-card.json         # React\nnpx shadcn@latest add https:\u002F\u002Fdissolve.rselmi.com\u002Fr\u002Fnative\u002Fscratch-card.json  # React Native\n```\n\n`init` preselects the platform from your `package.json` (`--native`, `--web` or `--yes` skip the\nquestion). Components land in `components\u002Fdissolve\u002F`\n(or `src\u002Fcomponents\u002Fdissolve\u002F` with a `src\u002F` layout):\n\n```tsx\nimport { SlideToConfirm } from '@\u002Fcomponents\u002Fdissolve\u002Fslide-to-confirm';\n\n\u003CSlideToConfirm label=\"Slide to pay 42 €\" doneLabel=\"Paid\" onConfirm={pay} className=\"mx-4 bg-zinc-100\" \u002F>\n```\n\nOn React Native they need NativeWind v5 (Tailwind v4, react-native-css) and `tailwind-merge`, like\nshadcn: later classes win, so `className=\"bg-blue-500\"` replaces the default background.\n\nOn the web they need React 19 and `react-dom`, nothing else: no engine, no Tailwind required. Each\none is a `'use client'` React wrapper around a framework free core that draws on a canvas, with the\nsame props as the native version (Next.js, Vite, any React 19 app):\n\n```tsx\nimport { ScratchCard } from '@\u002Fcomponents\u002Fdissolve\u002Fscratch-card';\n\n\u003CScratchCard onReveal={claim}>\n  \u003Cspan className=\"text-4xl font-bold\">$25\u003C\u002Fspan>\n\u003C\u002FScratchCard>\n```\n\n| Component | |\n|---|---|\n| `swipe-to-delete` | Swipe a row left, it dissolves and the list closes up. |\n| `toast` | Toasts that arrive in grains and leave as dust, with Undo. |\n| `like-button` | Heart pop with sparks, snaps into grains on unlike. |\n| `morph-button` | Dynamic Island style pill: loader, then done. |\n| `split-button` | Splits in the middle like liquid metal into Cancel and Confirm. |\n| `slide-to-confirm` | Slide to pay, shimmer label, loader, done. |\n| `gooey-menu` | Actions pour out of a round button as drops. |\n| `otp-input` | One time code boxes, shake and dust on a wrong code. |\n| `number-ticker` | Rolling digits for prices and counters. |\n| `reaction-picker` | iMessage style reactions on long press. |\n| `voice-note` | Voice message bubble, scrub the waveform, unsend as dust. |\n| `card-stack` | Wallet style card stack. |\n| `signature-pad` | Sign with a finger, clear into dust, PNG export. |\n| `before-after` | Before \u002F after image comparison. |\n\nTheme tokens (`--dissolve-background`, `surface`, `surface-2`, `foreground`, `muted`, `primary`,\n`primary-foreground`, `success`, `danger`, `danger-foreground`, `accent`, `border`, `chart-1` to `chart-3`) live in your\n`global.css` after `init`: change them once and every component follows.\n\n## Hooks\n\n| Hook | Purpose |\n|---|---|\n| `useDissolve` | Exits: `{ ref, dissolving, dissolve, reset }` |\n| `DissolveIn` \u002F `useAppear` | Entrances (`gather`, `rain`, `print`, or any exit with `direction: 'in'`) |\n| `useDissolveScrub` | Any preset driven by the finger, reversible, commits past a threshold or on a fling |\n| `useDissolveHold` | Hold to confirm, bursts at full charge |\n| `useDissolvePeel` | Peel a view by hand from any corner or edge, sticks back if released early |\n| `useDissolveScreen` | Full screen transitions |\n| `useDissolveMorph` | Turn view A into view B |\n\n## Documentation\n\n- Website: the `web\u002F` folder holds the docs and the showcase (gallery, variant pages, docs, agent\n  prompt), with a live Canvas 2D port of the engine. Component pages run the React web cores, built\n  into `web\u002Flib\u002F` by `npm run web:stamp` and committed, so the server needs no build step:\n\n  ```sh\n  cd web && python3 -m http.server 8000\n  ```\n\n- React web components: how a component becomes one, in [docs\u002FWEB.md](docs\u002FWEB.md).\n\n- Engine contract for variant authors: the documented types in `src\u002Fdissolve\u002Ftypes.ts` (`AtlasVariant`, `StepFn`, `CustomVariant`).\n- Variant math and intent: [docs\u002FVARIANTS.md](docs\u002FVARIANTS.md).\n\n## For coding agents\n\n- Agent prompt: the website's [Agent prompt](https:\u002F\u002Fdissolve.rselmi.com\u002Fdocs\u002Fagent-prompt\u002F) page gives a ready to paste prompt.\n- Claude skill: [web\u002Fskills\u002Fdissolve\u002FSKILL.md](web\u002Fskills\u002Fdissolve\u002FSKILL.md). Install it for every\n  project with:\n\n  ```sh\n  mkdir -p ~\u002F.claude\u002Fskills\u002Fdissolve-ui\n  cp web\u002Fskills\u002Fdissolve\u002FSKILL.md ~\u002F.claude\u002Fskills\u002Fdissolve-ui\u002FSKILL.md\n  ```\n\n- MCP server: [mcp\u002Fserver.mjs](mcp\u002Fserver.mjs), dependency free, Node over stdio. Tools:\n  `list_variants`, `get_variant`, `get_setup`. Register it with:\n\n  ```sh\n  claude mcp add dissolve -- npx -y dissolve-ui-mcp\n  codex mcp add dissolve -- npx -y dissolve-ui-mcp\n  ```\n\n  More clients in [mcp\u002FREADME.md](mcp\u002FREADME.md).\n\n## Development\n\n```sh\nnpm install\nnpm start          # then open in Expo Go\nnpm run typecheck  # tsc for the app and registry\u002Fweb\nnpm test           # CLI, registry, theme, engine and package tests (node:test)\n```\n\nThe tests live in `test\u002F` and run in CI on every push and pull request. See\n[CONTRIBUTING.md](CONTRIBUTING.md#tests) for the individual suites.\n\n## Contributing\n\nContributions are welcome, new components included: the\n[component workflow](CONTRIBUTING.md#adding-a-component) covers the registry file, the\n`index.json` entry, the demo, the web port and the tests. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the\n[Code of Conduct](CODE_OF_CONDUCT.md). Security issues: see [SECURITY.md](SECURITY.md).\n\n## License\n\n[MIT](LICENSE) © 2026 Rayan Selmi\n",2,"2026-11-24 04:54:16","CREATED_QUERY"]