[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107600":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":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":10,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},107600,"expo-glass-carousel","rit3zh\u002Fexpo-glass-carousel","rit3zh","💧 Liquid glass carousel for React Native","",null,"TypeScript",68,7,53,0,6,43.31,"MIT License",false,"main",[],"2026-11-02 08:08:05","2026-11-09 14:46:31","# expo-glass-carousel\n\nLiquid glass carousel for React Native, with cards that bend through glass as you swipe.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc5f732b8-3f3a-4367-8ab5-35e3e023ca48\n\n---\n\n## ⚙️ Installation\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Frit3zh\u002Fexpo-glass-carousel\ncd expo-glass-carousel\nbun install\nbun start -c\n```\n\nPeer dependencies (already set up in this template):\n\n```bash\nbunx expo install @shopify\u002Freact-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-image\n```\n\nThe component lives in [`src\u002Fcomponents\u002Fglass-carousel`](src\u002Fcomponents\u002Fglass-carousel). The demo invites screen is in [`src\u002Fcomponents\u002Fui\u002Finvites-screen`](src\u002Fcomponents\u002Fui\u002Finvites-screen).\n\n---\n\n## 🚀 Usage\n\nPut a `GlassCarousel.Item` inside `GlassCarousel.Root` for each card. The carousel snapshots each item's content into a Skia image, then draws the cards through the glass lens shader.\n\n```tsx\nimport { GlassCarousel } from \"@\u002Fcomponents\u002Fglass-carousel\";\n\nexport function Gallery({ cards }: { cards: { id: string; title: string }[] }) {\n  return (\n    \u003CGlassCarousel.Root onIndexChange={(index) => console.log(index)}>\n      {cards.map((card) => (\n        \u003CGlassCarousel.Item key={card.id} label={card.title}>\n          \u003CCard {...card} \u002F>\n        \u003C\u002FGlassCarousel.Item>\n      ))}\n    \u003C\u002FGlassCarousel.Root>\n  );\n}\n```\n\nChildren that aren't `GlassCarousel.Item` are drawn above the carousel as overlays. This is the place for headers, buttons or a status bar:\n\n```tsx\n\u003CGlassCarousel.Root background={\u003CBackdrop \u002F>}>\n  {items}\n  \u003CHeader \u002F>\n\u003C\u002FGlassCarousel.Root>\n```\n\nIf an item loads remote images, wait until they're ready before it's captured. You can also pass a `backdrop`, which is blurred in toward the bottom of the card, under the content:\n\n```tsx\n\u003CGlassCarousel.Item\n  label={invite.title}\n  ready={loaded.has(invite.id)}\n  backdrop={\u003CInviteCardBackdrop invite={invite} onLoad={markLoaded} \u002F>}\n>\n  \u003CInviteCard invite={invite} \u002F>\n\u003C\u002FGlassCarousel.Item>\n```\n\nDrag or flick to scroll. Tap a side card to snap to it, tap the center card to focus it, and tap again to close. VoiceOver\u002FTalkBack can use next, previous, focus and close actions, and reduce motion is respected.\n\n---\n\n## 🧩 API\n\n### `\u003CGlassCarousel.Root>`\n\n| Prop                 | Type                         | Default                   | Description                                |\n| -------------------- | ---------------------------- | ------------------------- | ------------------------------------------ |\n| `children`           | `ReactNode`                  | none                      | `GlassCarousel.Item`s, plus any overlays.  |\n| `defaultIndex`       | `number`                     | `0`                       | Item the carousel starts on.               |\n| `cardHeight`         | `number`                     | `450`                     | Card height (px).                          |\n| `aspect`             | `number`                     | `3 \u002F 4`                   | Card width ÷ height.                       |\n| `gap`                | `number`                     | `12`                      | Space between cards (px).                  |\n| `radius`             | `number`                     | `10`                      | Card corner radius (px).                   |\n| `background`         | `ReactNode`                  | none                      | Rendered behind the cards.                 |\n| `accessibilityLabel` | `string`                     | `\"Liquid glass carousel\"` | Label for the carousel.                    |\n| `onIndexChange`      | `(index: number) => void`    | none                      | Called when the centered item changes.     |\n| `onFocusChange`      | `(focused: boolean) => void` | none                      | Called when an item opens or closes focus. |\n| `style`              | `StyleProp\u003CViewStyle>`       | none                      | Style for the container.                   |\n\n### `\u003CGlassCarousel.Item>`\n\n| Prop         | Type               | Default      | Description                                                    |\n| ------------ | ------------------ | ------------ | -------------------------------------------------------------- |\n| `children`   | `ReactNode`        | none         | Card content. It is snapshotted, so it should be static.       |\n| `label`      | `string`           | `\"Item {n}\"` | Accessibility label read for this card.                        |\n| `ready`      | `boolean`          | `true`       | Hold the snapshot until content (e.g. images) has loaded.      |\n| `captureKey` | `string \\| number` | none         | Change it to capture the card again after its content changes. |\n| `backdrop`   | `ReactNode`        | none         | Layer behind the content, blurred toward the bottom.           |\n\n### `useGlassCarousel()`\n\nReads the carousel state from any component inside `GlassCarousel.Root`. It returns `index`, `focused`, `itemCount`, `reducedMotion`, and the `next()`, `previous()`, `open()` and `close()` controls. Overlays use it to build custom buttons.\n\n### Config\n\nDefaults live in [`glass-carousel.const.ts`](src\u002Fconstants\u002Fcomponents\u002Fglass-carousel.const.ts): card size, lens shape and dispersion, backdrop blur, focus timing, scroll physics (friction, spring stiffness, flick velocity) and the SkSL shaders.\n\n---\n\n## 🧱 Stack\n\n[Expo SDK 58](https:\u002F\u002Fexpo.dev\u002Fchangelog) · [React Native 0.88](https:\u002F\u002Freactnative.dev\u002F) · [React Native Skia](https:\u002F\u002Fshopify.github.io\u002Freact-native-skia\u002F) · [Reanimated 4](https:\u002F\u002Fdocs.swmansion.com\u002Freact-native-reanimated\u002F) · [Worklets](https:\u002F\u002Fdocs.swmansion.com\u002Freact-native-worklets\u002F) · [Gesture Handler](https:\u002F\u002Fdocs.swmansion.com\u002Freact-native-gesture-handler\u002F) · [Expo Image](https:\u002F\u002Fdocs.expo.dev\u002Fversions\u002Flatest\u002Fsdk\u002Fimage\u002F) · [@expo\u002Fui](https:\u002F\u002Fdocs.expo.dev\u002Fversions\u002Flatest\u002Fsdk\u002Fui\u002F) · [Expo Router](https:\u002F\u002Fdocs.expo.dev\u002Frouter\u002Fintroduction\u002F)\n\n---\n","这是一个为 React Native 设计的液态玻璃风格轮播组件，通过 Skia 渲染引擎实现卡片在拖拽时呈现动态弯曲与玻璃透镜折射效果。核心功能包括基于 Worklets 的高性能手势响应、Skia 快照渲染、可配置的模糊背景（backdrop）、无障碍支持（VoiceOver\u002FTalkBack）及减少动画适配。适用于需要高视觉表现力的移动端内容展示场景，如产品画廊、邀请卡片流、应用引导页或创意型信息流界面。",2,"2026-11-24 04:32:22","CREATED_QUERY"]