#ui #component #leptos #projects #headless #focus #biji

biji-ui

Effortless headless UI components for your Leptos projects

4 releases

new 0.1.3 Jun 13, 2024
0.1.2 May 28, 2024
0.1.1 May 7, 2024
0.1.0 May 7, 2024

#1632 in Web programming

Download history 209/week @ 2024-05-06 6/week @ 2024-05-20 146/week @ 2024-05-27 8/week @ 2024-06-03

166 downloads per month

MIT license

69KB
2K SLoC

Biji UI

Effortless UI Components for Your Leptos Projects

Build beautiful and functional user interfaces faster with Biji UI, a collection of essential UI components designed specifically for the Leptos framework.

Seamlessly integrated with any CSS framework, Biji UI allows you to leverage the power of utility-first styling to bring your components to life with ease. Focus on building the core functionality of your application while Biji UI handles the UI foundation.

Biji UI is inspired by popular headless UI libraries like HeadlessUI for React and Melt UI for Svelte.

Read the docs

Usage

Installation

cargo add biji-ui

Example

use leptos::*;
use biji_ui::components::accordion;

#[component]
pub fn AccordionExample() -> impl IntoView {

    let items = [
        ("Item 1", "Content 1"),
        ("Item 2", "Content 2"),
        ("Item 3", "Content 3"),
    ];

    view! {
        <accordion::Root>
            {items
                .into_iter()
                .map(|(title, content)| {
                    view! {
                        <accordion::Item>
                            <accordion::Toggle>
                                {title}
                            </accordion::Toggle>
                            <accordion::Content>
                                {content}
                            </accordion::Content>
                        </accordion::Item>
                    }
                })
                .collect::<Vec<_>>()}
        </accordion::Root>
    }
}

Dependencies

~22–34MB
~528K SLoC