Use the Sidebar component
mainSidebar component in Ripple UI is a vertical column designed to sit alongside main content. It is typically used for displaying navigation options or supplementary information.repository·main·Indexed 21 days ago
https://github.com/siumauricio/rippleuiA design system and component library built for Tailwind CSS, providing a collection of pre-styled, utility-first components. Version 1.12.1 includes components such as Buttons, Inputs, Modals, Navbars, and Tables, and can be integrated as a Tailwind CSS plugin with customizable themes and prefixes.
Sidebar component in Ripple UI is a vertical column designed to sit alongside main content. It is typically used for displaying navigation options or supplementary information.You can control the alignment of elements within the navbar using three specific sub-containers:
navbar-start: Aligns elements to the left.navbar-center: Aligns elements to the center.navbar-end: Aligns elements to the right.To indicate an active link, use the navbar-active class on a navbar-item.
<div className="navbar">
<div className="navbar-start">
<a className="navbar-item">Ripple UI</a>
</div
<div className="navbar-center">
<a className="navbar-item">Home</a>
<a className="navbar-item navbar-active">About</a>
<a className="navbar-item">Contact</a>
</div
<div className="navbar-end ">
<a className="navbar-item">Home</a>
</div
</divA standard RippleUI sidebar is composed of three main sections:
sidebar-title): Used for branding or application identity (e.g., logo and team name).sidebar-content): The primary navigation area. It typically contains a menu component with menu-section, menu-title, and menu-items.sidebar-footer): Located at the bottom, often used for user profiles or settings, frequently utilizing a dropdown component.To ensure the content area is scrollable while the footer stays at the bottom, apply min-h-[20rem] (or similar) to the sidebar-content section.
<aside class="sidebar sidebar-sticky">
<section class="sidebar-title">
<!-- Logo and App Name -->
</section>
<section class="sidebar-content">
<nav class="menu">
<!-- Navigation Links -->
</nav>
</section>
<section class="sidebar-footer">
<!-- User Profile / Settings -->
</section>
</aside>RippleUI provides a default theme that supports both light and dark modes, which can be toggled using the toggle-icon. The theme is built upon RadixUI Colors as its foundation.
By default, RippleUI applies the following styles to your application:
backgroundPrimary.content1.If you wish to override these default background and text colors, you must refer to the Customization documentation to disable this behavior.
Adjust the size of the Radio component using the following size classes:
radio-xs: Extra smallradio-sm: Smallradio-md: Mediumradio-lg: Largeradio-xl: Extra large<input type="radio" class="radio radio-xl" />You can customize the color of the progress bar by adding specific color utility classes. Ripple UI provides standard semantic colors and a 'flat' variant that changes the background color to match the theme.
<!-- Standard Colors -->
<progress class="progress progress-primary" value="50" max="100"></progress>
<progress class="progress progress-secondary" value="50" max="100"></progress>
<progress class="progress progress-success" value="50" max="100"></progress>
<progress class="progress progress-warning" value="50" max="100"></progress>
<progress class="progress progress-error" value="50" max="100"></progress>
<!-- Flat Colors (different background colors) -->
<progress class="progress progress-flat-primary" value="50" max="100"></progress>
<progress class="progress progress-flat-secondary" value="50" max="100"></progress>
<progress class="progress progress-flat-success" value="50" max="100"></progress>
<progress class="progress progress-flat-warning" value="50" max="100"></progress>
<progress class="progress progress-flat-error" value="50" max="100"></progress>To organize complex menus, you can group items into sections with titles and visual separators:
<span> with the menu-title class inside a menu-section to label a group of items.<div> with the divider class between menu-section elements to create a visual break.<nav className="menu bg-gray-2 p-4 rounded-md">
<section className="menu-section">
<span className="menu-title">Main menu</span>
<ul className="menu-items">
<li className="menu-item">General</li>
</ul>
</section>
<div className="divider my-0"></div>
<section className="menu-section">
<span className="menu-title">Settings</span>
<ul className="menu-items">
<li className="menu-item">Profile</li>
</ul>
</section>
</nav>If you are deploying a standard Node.js application, the built-in Remix app server is production-ready. Ensure you deploy the following directories generated by the build process:
build/public/build/The Avatar component represents a user by displaying a profile picture, initials, or an icon. It is styled using a set of predefined CSS classes applied to a container div.
<div className="avatar">
<img src="https://i.pravatar.cc/150?u=a042581f4e29026024d" alt="avatar" />
</div>Ripple UI provides a set of CSS classes to structure and style forms. To create a standard form, use the following class hierarchy:
form-group: A container for a collection of form fields.form-field: A container for an individual input field, its label, and optional validation messages.form-label: Used for the input's label text.form-label-alt: Used for secondary label text, such as validation error messages or helper text.form-control: A wrapper used to control the layout and alignment of elements within a field (e.g., for checkboxes or button alignment).input: The base class for input elements.checkbox: The class for checkbox inputs.btn: The base class for buttons, often combined with modifiers like btn-primary.<div class="form-group">
<div class="form-field">
<label class="form-label">Email address</label>
<input type="email" class="input" />
<label class="form-label">
<span class="form-label-alt">Please enter a valid email.</span>
</label>
</div>
</div>To prevent the modal from closing when a user clicks on the background overlay, simply omit the htmlFor attribute from the <label className="modal-overlay"> element. The modal will then only close via explicit close buttons (like a 'Cancel' button or an 'X' icon) that target the checkbox ID.
<label className="btn btn-primary" htmlFor="modal-3">Open Modal</label>
<input className="modal-state" id="modal-3" type="checkbox" />
<div className="modal">
<label className="modal-overlay"></label> <!-- No htmlFor attribute here -->
<div className="modal-content flex flex-col gap-5">
<label htmlFor="modal-3" className="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</label>
<h2 className="text-xl">Modal title 3</h2>
<div className="flex gap-3">
<button className="btn btn-error btn-block">Delete</button>
<button className="btn btn-block">Cancel</button>
</div>
</div>
</div>The my-react-app example uses standard Create React App scripts to manage the development lifecycle. Use these commands in the project directory to start development, run tests, or build for production.
# Run the app in development mode
npm start
# Launch the test runner in interactive watch mode
npm test
# Build the app for production
npm run build
# Eject from the build tool configuration (one-way operation)
npm run eject