项目的 README,来自 github.com/opencoredev/islandcn。合并为一个 markdown 文件:README.md。
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();
lib/island/, registry item island-core): the activity stack, four presentations (idle, compact, the split, expanded), springs fitted to frame-by-frame recordings of the real island, long-press, alerts and reduced motion. React only.components/islandcn/): upload, timer, now playing, incoming call, ride or delivery ETA, recording, nearby transfer, battery and the split, each one file on the engine, plus the content kit they share./playground): build an island for your app from a preset or a blank activity, fire every action, tune the motion and copy the install command and the code.app/, docs/content/).Coding agents can use the optional islandcn-skill registry item as an install helper; see /docs/agent-skill.
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.
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.