Introduction

Cosmic UI is a set of beautifully-designed sci-fi components with customizable SVG shapes. Built for modern frameworks with accessible interactive logic. Open Source. Fully Customizable.

Cosmic UI is a set of beautifully-crafted, customizable UI components with a sci-fi aesthetic. Built to empower you to create interfaces with futuristic designs using SVG shapes as the foundation, while leveraging zag.js for interactive components.

This is not a traditional component library. It is a system to build your own sci-fi component library.

You know how most component libraries work: you install a package, import the components, and use them as they are. But when you want a UI with a distinctive sci-fi style – sharp edges, frames, holographic panels – you often end up writing complex custom SVG or CSS code from scratch.

This is what Cosmic UI aims to solve. It is built around the following principles:

  • SVG First: Components use customizable SVG shapes to achieve a truly sci-fi look.
  • Selective zag.js Integration: Interactive components are powered by zag.js for accessibility and state management.
  • Full Control: You own and customize every component's markup, SVG paths, and styles.
  • Beautiful Sci-Fi Defaults: Carefully designed shapes, frames, and layouts that work out-of-the-box for sci-fi themed apps, dashboards, and games.
SVG First

Cosmic UI focuses on building components with SVG shapes at their core. This means:

  • Unique Designs: Break free from generic rectangles and create buttons, cards, modals, and panels with futuristic shapes.
  • Easy Customization: Modify the SVG paths to match your specific sci-fi design language.
  • Responsive: Components adapt to different sizes while maintaining shape integrity.
Selective Zag.js Integration

Not all components require complex state management. For components that do (such as menus, dialogs, tabs), Cosmic UI leverages zag.js to provide:

  • Accessible Logic: Keyboard interactions and ARIA compliance out-of-the-box.
  • Composable APIs: Consistent usage patterns across interactive components.
  • Framework Agnostic Logic: Use the underlying zag.js state machines in React, Vue, Solid, or other supported frameworks.
Beautiful Sci-Fi Defaults

Cosmic UI comes with a collection of components styled with a sci-fi aesthetic:

  • Buttons & Alerts: Styled with holographic glows, sharp angles, and SVG-based frames.
  • Menus & Modals: Designed to blend seamlessly into sci-fi interfaces with a consistent visual language.

These components look good out-of-the-box but are also easy to customize for your specific project needs.

Full Control

Unlike traditional libraries, you are not locked into predefined styles or markup. You can:

  • Edit SVG Paths: Modify the structure of your components at the lowest level.
  • Customize Styles Completely: Tailor colors, glows, gradients, and frames to match your design vision.

Extend Freely: Build new components using the same SVG-based approach to grow your sci-fi UI system.

Powered by synthetic caffeine · Deployed by Left4code · Signal traceable on GitHub.