molde-ui
v0.1.6
Published
UI component library built with React, TypeScript, Tailwind CSS and DaisyUI
Maintainers
Readme
molde-ui
Beautiful React components built with TypeScript, Tailwind CSS and DaisyUI
Features
- 🎨 Zero-config: CSS and themes are automatically applied
- 📦 TypeScript: Full type safety with excellent DX
- 🎭 DaisyUI: Beautiful themes out of the box
- ♿ Accessible: ARIA attributes and keyboard navigation
- 🌳 Tree-shakeable: Only import what you need
- 🚀 Framework agnostic: Works with React and Next.js (RSC-safe)
Components
- Menu - Vertical navigation menu with icons, subitems, and keyboard navigation
- FloatingMenu - Floating menu with toast on hover, supports 12 positions (bottomCenter, bottomStart, bottomEnd, topCenter, topStart, topEnd, left, leftStart, leftEnd, right, rightStart, rightEnd)
Installation
npm install molde-ui
# or
pnpm add molde-ui
# or
yarn add molde-uiQuick Start
Menu Component
import { Menu } from 'molde-ui';
import 'molde-ui/styles';
function App() {
const menuItems = [
{ label: 'Home', path: '/home' },
{ label: 'About', path: '/about' },
{ label: 'Contact', path: '/contact' },
];
return <Menu items={menuItems} activePath="/home" onItemClick={path => console.log(path)} />;
}FloatingMenu Component
import { FloatingMenu } from 'molde-ui';
import 'molde-ui/styles';
function App() {
const menuItems = [
{ label: 'Home', path: '/home', icon: <HomeIcon /> },
{ label: 'Settings', path: '/settings', icon: <SettingsIcon /> },
];
return (
<FloatingMenu
items={menuItems}
activePath="/home"
onItemClick={path => console.log(path)}
position="bottomCenter"
/>
);
}Theming
The library uses DaisyUI themes. You can change the theme by setting the data-theme attribute on your <html> element:
<html data-theme="cupcake">
<!-- Your app -->
</html>Available themes: light, dark, cupcake, forest, synthwave, cyberpunk, retro, valentine
TypeScript
Full TypeScript support with type definitions included. All components and props are fully typed.
import {
Menu,
FloatingMenu,
type MenuProps,
type MenuItemType,
type FloatingMenuProps,
type FloatingMenuItemType,
} from 'molde-ui';Accessibility
All components follow accessibility best practices:
- Keyboard navigation support
- ARIA attributes
- Focus management
- Screen reader friendly
Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Credits
This library is built on top of amazing open-source projects:
- DaisyUI - The most popular component library for Tailwind CSS. Thank you for providing beautiful, accessible components that make building UIs a joy!
- Tailwind CSS - A utility-first CSS framework
- React - The library for building user interfaces
- TypeScript - Typed JavaScript at any scale
License
MIT © molde-ui
Links
Made with ❤️ using React, TypeScript, Tailwind CSS and DaisyUI
