Crate next_rs

Source
Expand description

§Next RS - Documentation

Welcome to the official documentation for Next RS, a framework written in Rust that simplifies the process of building user interfaces. This framework provides a collection of features, each designed to enhance different aspects of UI development. Below are the features included in the Next RS ecosystem:

§Features

FeatureCrate DependencyGitHub RepositoryDescription
navbaryew-navbarGitHubCreate a responsive top-level navigation bar.
sidebaryew-sidebarGitHubBuild a customizable sidebar navigation component.
accordionyew-accordionGitHubBuild interactive accordion-style components.
alertyew-alertGitHubDisplay alerts with customizable styling and properties.
i18nyew-i18nGitHubImplement internationalization for multi-language support.
inputinput_yewGitHubUtilize custom input components for enhanced form handling.
cssstylistGitHubApply styling to your components using the Stylist crate integration.

To use a specific feature, enable it using the features configuration in your Cargo.toml file:

[dependencies]
next-rs = { version = "0.0.13", features = ["navbar", "sidebar", "css"] }

§Usage

To integrate Next RS into your application, follow these steps:

  1. Add Next RS and the desired feature crates to your Cargo.toml.
  2. Import the necessary components from the Next RS crate into your Rust code.
  3. Use the imported components within your Next RS components.

For example, to use the Navbar component, add the following dependency:

[dependencies]
next-rs = { version = "0.0.13", features = ["navbar"] }

Then, in your Rust code:

use next_rs::prelude::*;
use next_rs::Navbar;

#[func]
pub fn MyNavbar() -> Html {
    let menus = vec![/* define your menu items here */];

    rsx! {
        <Navbar menus={menus} />
        // Your component logic here...
    }
}

For more detailed information and examples, check the examples provided in the library.

§Contribution

If you encounter any issues or have suggestions for improvements, feel free to contribute to the GitHub repository. We appreciate your feedback and involvement in making Next RS better!

§Acknowledgments

Special thanks to the Yew community and contributors for such an amazing framework.

Re-exports§

pub use head::Head;
pub use image::Image;
pub use image::ImageProps;
pub use link::LinkProps;
pub use router::*;
pub use self::prelude::*;

Modules§

head
history
A module that provides universal session history and location information.
image
link
prelude
The Next RS Prelude
router

Structs§

Accordion
Accordion component.
AccordionButton
AccordionButton component.
AccordionItem
AccordionItem component.
Alert
Alert Component
AlertProps
Props for the Alert component.
I18nProvider
Yew component for providing the YewI18n context to its children.
Input
custom_input_component A custom input component that handles user input and validation.
Menu
MenuItem
Navbar
NavbarProps
Properties for the Navbar component
Renderer
The Yew Renderer.
Sidebar
SidebarProps
YewI18n
The YewI18n struct representing the state and methods for internationalization.

Functions§

log
The console.log() function.
use_translation
Note

Attribute Macros§

styled_component