Add SoftUI to your project in seconds. No build tools required.
npm install softui-css
# or
yarn add softui-css
# or
pnpm add softui-css
# or
bun add softui-css
Drop these two lines into your <head> and you're ready to go:
<link rel="stylesheet" href="https://unpkg.com/softui-css/dist/softui.min.css">
<script src="https://unpkg.com/softui-css/dist/softui.min.js"></script>
Most components are pure CSS. Some interactive components require softui.js — a lightweight, dependency-free script (~4KB min).
Include it at the end of your <body>:
<script src="https://unpkg.com/softui-css/dist/softui.min.js"></script>
Components that need JS: Accordion, Calendar, Carousel, Chart, Collapsible, Color Picker, Combobox, Command, Context Menu, Data Table, Dock, Drag & Drop, Dropdown, File Upload, Input OTP, Menubar, Modal, Popover, Rating, Resizable, Sheet, Sidebar, Slider, Swap, Tabs, Toggle Group, and form enhancements (Password Toggle, Number Input, Tags Input).
SoftUI is plain CSS — it works with any framework. Just import the styles and use the classes.
/* React — import in your entry file (App.jsx or index.jsx) */
import 'softui-css/dist/softui.min.css';
import 'softui-css/dist/softui.min.js';
function App() {
return (
<button className="sui-btn sui-btn-primary">Click me</button>
);
}
/* Vue — import in main.js */
import 'softui-css/dist/softui.min.css';
import 'softui-css/dist/softui.min.js';
<template>
<button class="sui-btn sui-btn-primary">Click me</button>
</template>
/* Svelte — import in +layout.svelte or app.html */
import 'softui-css/dist/softui.min.css';
import 'softui-css/dist/softui.min.js';
<button class="sui-btn sui-btn-primary">Click me</button>
/* Astro — import in your layout */
---
import 'softui-css/dist/softui.min.css';
---
<script src="/node_modules/softui-css/dist/softui.min.js"></script>
/* Next.js — import in _app.js or layout.tsx */
import 'softui-css/dist/softui.min.css';
/* Add softui.min.js via Script component or next/script */
Tip: For JS-dependent components (modals, dropdowns, etc.), make sure softui.js loads after the DOM is ready. In React/Vue/Svelte, the import handles this automatically.
Here's a minimal HTML page with a neumorphic button and card:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/softui-css/dist/softui.min.css">
</head>
<body class="sui-d-flex sui-justify-center sui-align-center sui-min-vh-100">
<div class="sui-card sui-raised sui-p-5 sui-text-center">
<h3>Hello SoftUI</h3>
<p class="sui-text-muted sui-mt-2 sui-mb-3">
A neumorphic card with a soft raised shadow.
</p>
<button class="sui-btn sui-btn-primary">Get Started</button>
</div>
<script src="https://unpkg.com/softui-css/dist/softui.min.js"></script>
</body>
</html>
Add data-theme="dark" to your <html> element. Every component adapts automatically.
<html data-theme="dark">
To prevent a flash of light mode when the page loads, add this blocking script in your <head> before any stylesheets:
<head>
<style>body{opacity:0}</style>
<script>
var t = localStorage.getItem('sui-theme');
if (t === 'dark' || (!t && matchMedia('(prefers-color-scheme:dark)').matches))
document.documentElement.setAttribute('data-theme', 'dark');
</script>
<link rel="stylesheet" href="softui.min.css">
</head>
The inline opacity:0 hides the page until SoftUI's CSS loads (which sets opacity:1), eliminating any flash. The script reads the saved theme preference before the first paint.
SoftUI is built on CSS custom properties. Override them anywhere to match your brand:
:root {
--sui-primary: #7C5CFC;
--sui-radius: 12px;
--sui-shadow-raised: 6px 6px 12px rgba(0,0,0,0.15),
-6px -6px 12px rgba(255,255,255,0.05);
}
See the Theming Guide for the full list of variables — colors, shadows, radius, fonts, transitions, and dark mode.
SoftUI works in all modern browsers. No polyfills needed.
Fully Supported:
Chrome 90+ ✓
Edge 90+ ✓
Firefox 100+ ✓
Safari 15+ ✓
Opera 76+ ✓
Partial Support:
Firefox < 121 :has() selector not available (minor styling only)
Safari < 15.4 backdrop-filter may need -webkit- prefix (already included)
iOS Safari 15+ ✓ (momentum scrolling included)
Android Chrome 90+ ✓
Not Supported:
Internet Explorer ✗ (uses CSS custom properties, flexbox gap, etc.)
SoftUI uses modern CSS features: custom properties, flexbox gap, :focus-visible, conic-gradient, and prefers-reduced-motion. All vendor prefixes are included where needed.
SoftUI supports right-to-left languages like Arabic, Hebrew, and Farsi. Just add dir="rtl" to your <html> element.
<html lang="ar" dir="rtl">
Utility classes (sui-ml-*, sui-mr-*, sui-text-left/right, sui-offset-*) use CSS logical properties and adapt automatically. Components like sheets, carousels, sidebars, breadcrumbs, dropdowns, and tooltips include [dir="rtl"] overrides to flip their positioning.
SoftUI includes built-in @media print styles. When users print your page or save as PDF, navbars, sidebars, modals, toasts, and other overlays are automatically hidden. Box-shadows are removed, cards and tables get clean borders, and page breaks are prevented inside components. No extra setup needed.
This is a neumorphic modal dialog. It features backdrop blur, smooth animations, and focus trap. Press Escape or click outside to close.
Your session will expire in 5 minutes. Would you like to stay signed in?
This action cannot be undone. This will permanently delete the item and remove all associated data.
This modal takes up the entire viewport. Useful for immersive content, editors, or media viewers.
Press Escape or click the close button to dismiss.
By accessing and using this service, you accept and agree to be bound by the terms and provision of this agreement. In addition, when using these particular services, you shall be subject to any posted guidelines or rules applicable to such services. Any participation in this service will constitute acceptance of this agreement.
Permission is granted to temporarily download one copy of the materials on this website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not modify or copy the materials, use the materials for any commercial purpose, attempt to reverse engineer any software, or remove any copyright notations.
The materials on this website are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property.
In no event shall this company or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials, even if we have been notified orally or in writing of the possibility of such damage.
The materials appearing on this website could include technical, typographical, or photographic errors. We do not warrant that any of the materials on its website are accurate, complete or current. We may make changes to the materials contained on its website at any time without notice.
We have not reviewed all of the sites linked to this website and are not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement. Use of any such linked web site is at the user's own risk.
We may revise these terms of service for this website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service. Any changes will be posted on this page with an updated revision date.
These terms and conditions are governed by and construed in accordance with applicable laws and you irrevocably submit to the exclusive jurisdiction of the courts in that location. If any provision of these terms shall be unlawful, void, or unenforceable, then that provision shall be deemed severable and shall not affect the validity of the remaining provisions.
Clicking outside this modal won't close it. Instead, the modal will shake to indicate it requires explicit action. Use the close button or press Escape to dismiss.
This modal has no backdrop blur. The background is visible but dimmed.
A subtle 3px backdrop blur. Content behind is slightly softened.
A heavy 12px backdrop blur. Background is barely recognizable.
Maximum 20px blur. Background is fully frosted.
This is a default right-side sheet. It slides in from the right edge of the screen with a blurred backdrop.
Sheets are great for navigation menus, settings panels, detail views, and forms that don't need to interrupt the main content flow.
This sheet slides down from the top. Great for announcements, notification panels, or search interfaces.
This is a small (280px) right-side sheet.
This is a large (480px) right-side sheet. Great for forms, detail views, or complex content.
Clicking outside this sheet won't close it. The sheet will shake to indicate it requires explicit action. Use the close button or press Escape.