项目
在 GitHub 查看
rizznme/cosmic-ui
关于
面向现代 Web 应用的科幻主题组件和未来感设计元素集合。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Cosmic UI

Sci-fi themed React component library and docs site, ported from the original Vite + React SPA to Astro (static output, React islands for interactive parts).
Dev
npm install
npm run dev
Build
npm run build
npm run preview
Structure
src/components/ui/— the component library itself (Button, Dialog, Menu, Combobox, Toast, Tabs, Accordion, Alert, Checkbox, RadioGroup, Switch, Input, Textarea, Chart, Frame). Mostly thin wrappers around@zag-js/*state machines plus the customFrameSVG decoration system.src/components/docs/— shared doc-page building blocks (Wrapper,Title,Previewtabs,PreviewCode,InstallPackage, TOCMenu).src/components/pages/— one file per route's actual content (near-1:1 port of the old page's content), mounted as a React island.src/components/SiteChrome.tsx— header nav + mobile sidebar drawer, global across every page viaBaseLayout.astro.src/layouts/BaseLayout.astro/DocsLayout.astro— page shells.src/pages/— thin Astro route files, one per/docs/<name>page plusindex.astro(home).
Adding a new component
- Add the component to
src/components/ui/<name>.tsx(@zag-js/*+Frame+cva/twMerge, matching the existing components' style). - Add its doc content to
src/components/pages/<name>.tsx(copy an existing one as a template —Preview/Installation/Usagesections). - Add the route:
src/pages/docs/<name>.astro, rendering<DocsLayout><YourPage client:load /></DocsLayout>. - Add a nav link in
src/components/SiteChrome.tsx'sdocLinks.
探索相关项目
加载中…