islandcn README

项目的 README,来自 github.com/opencoredev/islandcn。合并为一个 markdown 文件:README.md。

islandcn

A Dynamic Island-style component for any React app, installed with shadcn. Show an upload, a timer, a song, a ride on its way, an incoming call or a recording in one island at the top of your app, and shape each activity around your app's own actions.

npx shadcn@latest add https://islandcn.dev/r/island-core.json
"use client";

import { Island, IslandProvider, useIsland } from "@/lib/island";

// Mount once near the root.
<IslandProvider>
  <Island placement="viewport" />
  <App />
</IslandProvider>;

// Then, from any component inside it:
const island = useIsland();
const upload = island.start({
  id: "upload",
  label: "Uploading report.pdf",
  compact: { leading: <CloudIcon />, trailing: <ProgressRing value={0.4} /> },
  expanded: { center: <span>report.pdf</span>, bottom: <Progress value={0.4} /> },
});
upload.update({ compact: { trailing: <ProgressRing value={0.8} /> } });
upload.end();

What's here

Coding agents can use the optional islandcn-skill registry item as an install helper; see /docs/agent-skill.

Develop

pnpm install
pnpm dev           # http://localhost:3000
pnpm typecheck
pnpm build         # builds the registry into public/r, then the site

Read AGENTS.md before changing anything.

The recordings the motion was fitted to are not in this repo. /lab still plays every transition from its built-in sequences in pnpm dev; /compare, which sets the web side against the recordings, has nothing to show, and the one test that reads them is skipped.

License

MIT, copyright (c) 2026 Leo. See LICENSE. islandcn copies the look and motion of Apple's island, but none of Apple's assets. It is not affiliated with Apple. Dynamic Island is a trademark of Apple Inc.

islandcn (opencoredev/islandcn)

正在搜索数据库…

这是什么?一个开源的、类似灵动岛(Dynamic Island)风格的组件,适用于任何 React 应用,通过 shadcn 安装。它把上传、计时器、歌曲或来电等活动显示在应用顶部的同一个灵动岛里。
这是要导入的库,还是现成的应用?它是供你自己的项目使用的组件库,不是独立应用。底层是一个只支持 React 的引擎,另外还提供可直接套用的预设。
我怎样把它装进我的项目?打开 /playground 页面,从预设或空白活动中搭建一个灵动岛,然后复制它生成的安装命令和代码。编程助手也可以使用可选的 islandcn-skill 注册项。
安装前我需要准备什么?一个兼容 shadcn 的 React 项目,因为安装要通过 shadcn 进行。README 中没有列出其他前置条件。
动效会和苹果的原始录制完全一致吗?在这个仓库里做不到。拟合动效所用的录制素材没有包含在内,所以 /compare 没有可展示的内容,并且有一个测试会被跳过。
我可以把它用在商业产品里吗?可以。它采用 MIT 许可证,因此你可以按照 LICENSE 文件中的条款使用。
安装任何东西之前,我能先试一试吗?可以。访问 /playground 页面,从预设或空白活动中搭建一个灵动岛,触发每个操作,调整动效,并查看代码。
引擎能为我处理哪些事情?活动栈、四种展示状态(空闲、紧凑、分屏、展开)、弹簧动效、长按、提醒,以及对减少动态效果的支持。
为什么动效感觉和苹果的灵动岛很接近?弹簧参数是根据真实灵动岛的逐帧录制拟合出来的,所以动效与原版高度吻合。
大小
1.8 MB
星标
795
更新
提交Nov 13
时长
5天
提交 · 90 天