Choose your architecture: Multi-Page for content sites, or Single-Page for app-like experiences. Up and running in 30 seconds.
Choose Multi-Page (MPA) or Single Page (SPA) mode!
What happens: Creates a new project folder and package.json
What happens: Downloads Domma from npm (~260KB minified)
What happens: Interactive prompt lets you choose Multi-Page (MPA) or Single Page (SPA) mode!
npx domma init --mpa - Multi-Page Application (traditional)npx domma init --spa - Single Page Application (client-side routing)
Both modes include Navbar, Footer, 16+ Themes, Icons, Grid, Components, and Mobile Responsive design
App-like experience with client-side routing
Traditional site with separate HTML pages
Open index.html (MPA) or frontend/index.html (SPA) in your browser to see your new site.
Everything is ready to use - navbar, footer, theming, grid, components.
Customise via domma.config.json or dive into the code.
Skip npm and use Domma from a CDN - single HTML file, no build tools.
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://unpkg.com/domma-js/public/dist/domma.css">
<link rel="stylesheet" href="https://unpkg.com/domma-js/public/dist/elements.css">
</head>
<body class="dm-theme-charcoal-dark">
<nav id="nav"></nav>
<main class="container py-6">
<h1>Hello Domma!</h1>
<button class="btn btn-primary" id="toast-btn">Click Me</button>
</main>
<script src="https://unpkg.com/domma-js/public/dist/domma.min.js"></script>
<script>
$(() => {
// Use Domma Config for declarative setup
$.setup({
'body': {
component: 'theme',
options: { theme: 'charcoal-dark', persist: true }
},
'#nav': {
component: 'navbar',
options: {
brand: { text: 'My App' },
items: [{ text: 'Home', url: '/' }]
}
},
'#toast-btn': {
events: {
click: () => {
Domma.elements.toast.success('Hello! 🎉', {
position: 'top-center',
duration: 3000
});
}
}
}
});
});
</script>
</body>
</html>
Note: For production, use the npm workflow above for better performance and bundle optimisation.