尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Reusable React liquid-glass refraction components and interactive demos
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A React component library built on project-owned liquid glass optics and physical motion. This repository is an npm-workspaces monorepo.
• packages/react-liquid-glass — the independently buildable rglass package, including the liquid-glass and apple-motion cores, React components, optional styles, and declarations.
• apps/docs — the documentation site: homepage, interactive component catalog, individual usage/API pages, shared-material Playground, and three working showcase applications.
• tests — cross-workspace regression checks.檢視完整 README ↗HDR · Glass fusion · Apple-like motion · Spring physics
A React component library built on project-owned liquid glass optics and physical motion. This repository is an npm-workspaces monorepo.
npm package · Live documentation
packages/react-liquid-glass — the independently buildable rglass package, including the liquid-glass and apple-motion cores, React components, optional styles, and declarations.apps/docs — the documentation site: homepage, interactive component catalog, individual usage/API pages, shared-material Playground, and three working showcase applications.tests — cross-workspace regression checks.The docs app imports public package entry points. Development aliases enable source HMR; production builds consume the built library package. Neither core imports documentation, example content or the other core.
npm ci
npm run dev
The documentation site runs at http://localhost:32472.
npm run check # Type-check both workspaces
npm test # Library, documentation examples, optical regressions
npm run build # Build the library, then the docs site
npm run preview # Preview the production site
npm run build:lib # Build only the reusable package
Production output: packages/react-liquid-glass/dist for the library; dist/client for the site. Node.js 22.18+ is required for the repository tests; deployment uses Node.js 24. npm pack --workspace rglass builds the publishable tarball without publishing it.
The dev server accepts ?renderer=webgl2 or ?renderer=webgpu to compare backends; production always selects automatically. /tests/browser-smoke.html runs the application checks in either mode (GL-uniform probes run in WebGL2). /tests/gpu-parity.html compares the backends at identical geometry and DPR, rejects empty renders and fusion-neck seams, and exercises recovery, backend switching, HDR and performance. Its floating-point HDR fixture runs on SDR hardware and does not verify a physical display. /tests/readme-cover.html is the README cover scene; with the dev server running, node apps/docs/tests/readme-cover.mjs re-renders the cover and og.jpg.
Install the package from npm:
npm install rglass react@^19 react-dom@^19 motion@^13
import { GlassButton, GlassStage } from "rglass/controls";
import { LiquidGlassProvider } from "rglass/liquid-glass";
import "rglass/controls.css";
export function Example() {
return (
<LiquidGlassProvider material={{ chromaAmount: 0.24 }}>
<GlassStage style={{ padding: 48 }}>
<GlassButton onClick={() => console.log("Pressed")}>Continue</GlassButton>
</GlassStage>
</LiquidGlassProvider>
);
}
See the package README for entry points and rendering boundaries.
/components — live catalog with category filters and a shared-material inspector./components/:component — individual previews, complete copyable examples and API reference./playground — 21 numeric renderer parameters, lens profile and light source, and the live optical field; presets, per-component/all-component views, grid, lines, photo and text substrates, a side-by-side comparison with the defaults, a frame-rate readout, local persistence, reset, copied code and shareable URLs./showcase/focus — a deadline-based focus timer with local notes./showcase/sequencer — an eight-step, four-note Web Audio instrument./showcase/orbit — direct manipulation with momentum, edge resistance, surface tension and shared-SDF fusion./docs/installation — package setup, core boundaries and usage./docs/:guide — theming, material and HDR, motion, renderer, performance, accessibility, browser support and server rendering.The site supports persisted English/Chinese and light/dark preferences; without a saved choice the theme follows the system. The header's HDR toggle is shared across pages, independent of material presets, and available on supported displays. All showcase interactions run locally; the sequencer only starts audio after a user action.
GitHub Actions checks types, runs the tests, builds the docs and validates the package contents on pull requests and pushes to main. Vercel deploys the docs from main with vercel.json at the repository root.
MIT. See LICENSE.