Lightning Fast
Optimized for performance with minimal bundle size and efficient CSS architecture.
A flexible, accessible, and modern CSS framework for building beautiful user interfaces
Current version: BETA
Dragonfly UI is a modern, flexible CSS framework designed to help developers build beautiful, accessible, and responsive user interfaces with ease. Whether you're creating a simple website or a complex web application, Dragonfly UI provides the tools you need to create outstanding user experiences.
Built with modern CSS features and optimized for Lightning CSS, Dragonfly UI delivers exceptional performance without sacrificing functionality.
Every component is designed mobile-first with responsive breakpoints and container queries for optimal display across all devices.
Extensive theming system with CSS custom properties, multiple built-in themes, and easy brand customization.
Comprehensive documentation, TypeScript support, and excellent integration with modern frameworks like React, Vue, and Astro.
Get up and running with Dragonfly UI in minutes:
# Install via npm
npm install @casoon/dragonfly
# Or via yarn
yarn add @casoon/dragonfly
# Or via pnpm
pnpm add @casoon/dragonfly
/* Import the core styles */
@import '@casoon/dragonfly/core.css';
/* Add a theme */
@import '@casoon/dragonfly/themes/day.css';
<!-- Start building with components -->
<div class="theme-day">
<div class="container">
<h1 class="text-3xl font-bold mb-4">Hello Dragonfly!</h1>
<button class="button button--primary">Get Started</button>
</div>
</div>
Essential UI building blocks like buttons, inputs, badges, and form controls.
Explore Elements →Complex interactive components including modals, tables, navigation, and data displays.
View Components →Dragonfly UI works seamlessly with your favorite frameworks:
import '@casoon/dragonfly/core.css';
import '@casoon/dragonfly/themes/day.css';
function App() {
return (
<div className="theme-day">
<button className="button button--primary">
Click me!
</button>
</div>
);
}
<template>
<div class="theme-day">
<button class="button button--primary">
Click me!
</button>
</div>
</template>
<script setup>
import '@casoon/dragonfly/core.css';
import '@casoon/dragonfly/themes/day.css';
</script>
---
import '@casoon/dragonfly/core.css';
import '@casoon/dragonfly/themes/day.css';
---
<div class="theme-day">
<button class="button button--primary">
Click me!
</button>
</div>
Dragonfly UI uses CSS @layer
to ensure predictable specificity and easy customization:
@layer reset, tokens, core, layout, typography,
utilities, components, effects, themes;
Modern responsive design with container queries for component-based responsiveness:
@container (min-width: 30rem) {
.card {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
Consistent design with CSS custom properties:
:root {
--color-primary: #e72779;
--space-4: 1rem;
--radius-md: 0.375rem;
}
Dragonfly UI supports all modern browsers:
For older browsers, we provide graceful fallbacks to ensure your content remains accessible.
Report issues on our GitHub repository.
We'd love to hear your ideas! Share them in our discussions.
This documentation is open source. Help us improve it by contributing.
Check out our contribution guidelines to get started.
Getting Started
Ready to dive in? Start with our installation guide or explore our component library.
Beta Notice
Dragonfly UI is currently in beta. While the core functionality is stable, the API may change before the 1.0 release. We recommend using it in production only after thorough testing.