Welcome to Open SASS
πŸ—ƒοΈ Sidebar: The Composable Wasmy Sidebar
Mahmoud Harmouch
Mahmoud HarmouchMay 02 2025

πŸ—ƒοΈ Sidebar: The Composable Wasmy Sidebar

#sidebar-release

Welcome πŸ‘‹!

If you've ever built a Rust-powered frontend, you've probably felt this pain: "How the heck do I make a sidebar that doesn't look like it crawled out of the year 2001?"

We get it. Collapsibles, user profiles, nested menus, custom styles... you need a PhD in CSS gymnastics and a minor in JavaScript contortionism just to get a halfway-decent result.

That's so over, and we are so back!

Introducing Sidebar, the ultimate plug-and-play sidebar component for Yew, Dioxus, and Leptos. It's clean, fast, accessible, and stupidly customizable. And yep, it just works.

Let's open it up 🧰.

vibin

πŸ—ƒοΈ What Is Sidebar?

Sidebar is a fully modular, highly customizable sidebar component built specifically for WASM UI frameworks. It's designed to make your app feel like a well-polished dashboard without you rage-quitting halfway through.

Here's what it gives you out of the box:

  • βœ… Collapsible layout with smooth toggle.
  • βœ… Nested submenus (with disclosure arrows!).
  • βœ… Badges, icons, and dynamic styling.
  • βœ… Built-in profile section with avatar + logout.
  • βœ… Full control via props, class, and style.
  • βœ… Idiomatic Rust state management with UseStateHandle.
  • βœ… Designed with accessibility in mind.

Whether you're building a SaaS dashboard, admin panel, or a hobby side project, Sidebar will save you hours of UI pain.

⚑️ Why You'll Love It

Let's break it down:

FeatureWhy it's awesome
Modular ComponentsUse just what you need: Sidebar, Menu, MenuItem, Submenu, Profile, or Logo
ComposabilityNest menus, add icons, toggle visibilityβ€”anything goes
CustomizationEvery pixel is yours to style with props, class, or style
Built for RustIdiomatic use of Callback, UseStateHandle, and Html
Responsive + AccessibleAuto-collapses on mobile; plays nice with screen readers

And the cherry on top? It's built by Open SASS, a community on a mission to make Rust web development suck less.

πŸš€ Quick Start with Yew

Getting up and running is easier than convincing Ferris to wear a bow tie.

cargo add sidebar --features=yew

Then plug it into your app:


You now have a sleek, collapsible sidebar with dynamic state and profile logout handling πŸŽ‰.

πŸ” What You Can Customize (Spoiler: Everything)

Here's a taste of what you can tweak:

🧱 Sidebar Props

  • style, class: Tweak the outer container to match your brand.
  • user_name, designation, user_img: Show off your user's profile.
  • logo_img_url, logo_href: Your logo, your link.
  • on_logout: Handle logout like a pro (or a script kiddie, no judgment).

πŸ“‹ Menu & MenuItem

  • sub_heading: Optional section labels.
  • href: Navigation links.
  • icon_html: Drop in custom SVGs or emojis (we love emojis, btw).
  • selected: Use shared UseStateHandle<String> for tracking.

πŸ”½ Submenu

  • Supports deep nesting.
  • Expand/collapse toggle.
  • Styled with arrows because UI polish.

πŸ™‹ Profile

  • Automatically hides when sidebar is collapsed.
  • Includes a logout button.
  • Fully styleable.

All of this controlled with easy props like style, class, and Callback.

Below 768px? Sidebar auto-collapses into a sleek mobile-friendly mode. No JavaScript hacks. Just Rust and vibes.

πŸ’‘ Final Thoughts

Stop wasting time rebuilding sidebars from scratch. Sidebar gives you everything you need, and nothing you don't, to ship polished, responsive, and composable UI components in your Rust WASM apps.

So go ahead. Drop it in your app. Customize it. Hack it. Make it yours.

We are Open SASS, babe!.

We're working tirelessly on making Rust web development extremely easy for everyone.

If you made it this far, it would be nice if you could join us on Discord.

Till next time πŸ‘‹!