Crate opensass

Source
Expand description

§🧩 OpenSASS

Crates.io Crates.io Downloads Crates.io License made-with-rust Rust Maintenance

Join our Discord

logo

🐧 Linux (Recommended)πŸͺŸ Windows
cargo install opensasscargo install opensass
Download Executable FileDownload .exe File
os -hos -h

🧩 OpenSASS: A CLI tool for downloading reusable OpenSASS components from crates.io and integrating them into your WASM frontend projects.

Β§πŸ“– Table of Contents

Β§πŸš€ Installation

To install the CLI:

cargo install opensass

Or build from source:

git clone https://github.com/opensass/cli.git
cd cli
cargo build --release

§✨ Features

  • 🧩 Add OpenSASS component-based crates with a single command.
  • βš™ Automatically updates Cargo.toml with proper features.
  • πŸ” Copies only the src/ files related to the specified feature.

Β§πŸ’‘ Usage

Β§Yew Usage

os add i18nrs yew

This will:

  • Download the i18nrs crate.
  • Extract files only related to the yew feature.
  • Copy src/ files into your project under a new directory crate_name, in this case i18nrs.
  • Update your Cargo.toml dependencies and lib.rs file.

Β§Dioxus Usage

os add i18nrs dio

Β§Leptos Usage

os add i18nrs lep

Β§πŸ§ƒ Components

Open SASS offers the following components:

🧩 ComponentπŸ“¦ RepositoryπŸ“ Description
accordion-rsGitHub↕️ A highly customizable accordion component for WASM frameworks.
alert-rsGitHub⚠️ A highly customizable alert component for WASM frameworks.
eldGitHubπŸš› ELD Toolkit for WASM frameworks.
i18nrsGitHub🌐 Internationalization (i18n) component for WASM frameworks.
image-rsGitHubπŸ–ΌοΈ Image Component for WASM frameworks.
input-rsGitHubπŸ”€ A highly customizable input component for WASM frameworks.
navbarGitHubπŸ” A highly customizable navbar component for WASM frameworks.
radiorsGitHubπŸŽ›οΈ A highly customizable radio buttons component for WASM frameworks.
scroll-rsGitHubπŸ–±οΈ A highly customizable scroll-to-anywhere component for WASM frameworks.
select-rsGitHubπŸ”½ A highly customizable select group component for WASM frameworks.
sidebarGitHubπŸ—ƒοΈ A sidebar component for WASM frameworks.
skeleton-rsGitHub🦴 A skeleton component for WASM frameworks.
slider-rsGitHub🎚️ A slider component for WASM frameworks.
table-rsGitHubπŸ“‹ Table component for WASM frameworks.
themeGitHub🎨 A highly customizable theming system for WASM frameworks.

And much more coming over time…

§⚑ Benchmark

❯ time yes | npx shadcn@latest add accordion
npx shadcn@latest add accordion  8.98s user 4.85s system 90% cpu 15.279 total
❯ time os add accordion-rs yew
os add accordion-rs yew  0.16s user 0.02s system 5% cpu 0.2 total

Open SASS CLI is ~56Γ— faster in user time and uses ~18Γ— less CPU than shadcn. More optimizations on the way πŸš€.

§🀝 Contributions

Contributions are welcome! Whether it’s bug fixes, feature requests, or examples, we would love your help to make Open SASS better.

  1. Fork the repository.
  2. Create a new branch for your feature/bugfix.
  3. Submit a pull request for review.

Β§πŸ“œ License

Open SASS is licensed under the MIT License. You are free to use, modify, and distribute this library in your projects.

ModulesΒ§

cli
This module contains the CLI functionalities for interacting with the OpenSASS ecosystem.
cmds
utils