1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
#![doc(
html_logo_url = "https://github.com/next-rs/next-rs/assets/62179149/60e6d58f-6749-4308-86f0-fc0ff28c95f6",
html_favicon_url = "https://github.com/next-rs/next-rs/assets/62179149/8ac122c9-e55c-4204-9b53-6981f17cefcc"
)]
//! # 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
//!
//! | Feature | Crate Dependency | GitHub Repository | Description |
//! |----------------|--------------------------|------------------------------------------------------------|------------------------------------------------------------|
//! | `navbar` | `yew-navbar` | [](https://github.com/next-rs/yew-navbar) | Create a responsive top-level navigation bar. |
//! | `sidebar` | `yew-sidebar` | [](https://github.com/next-rs/yew-sidebar) | Build a customizable sidebar navigation component. |
//! | `accordion` | `yew-accordion` | [](https://github.com/next-rs/yew-accordion) | Build interactive accordion-style components. |
//! | `alert` | `yew-alert` | [](https://github.com/next-rs/yew-alert) | Display alerts with customizable styling and properties. |
//! | `i18n` | `yew-i18n` | [](https://github.com/next-rs/yew-i18n) | Implement internationalization for multi-language support. |
//! | `input` | `input_yew` | [](https://github.com/next-rs/input-yew) | Utilize custom input components for enhanced form handling. |
//! | `css` | `stylist` | [](https://github.com/futursolo/stylist-rs) | Apply 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:
//!
//! ```toml
//! [dependencies]
//! next-rs = { version = "0.0.8", 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:
//!
//! ```toml
//! [dependencies]
//! next-rs = { version = "0.0.8", features = ["navbar"] }
//! ```
//!
//! Then, in your Rust code:
//!
//! ```rust,no_run
//! 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.
//!
//! [examples]: https://github.com/next-rs/next-rs/tree/main/examples
//!
//! ## Contribution
//!
//! If you encounter any issues or have suggestions for improvements, feel free to contribute to the
//! [GitHub repository](https://github.com/next-rs/next-rs). 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.
//!
pub mod image;
pub mod link;
pub use link::{Link, LinkProps};
pub use image::{Image, ImageProps};
#[cfg(feature = "input")]
pub use input_yew::CustomInput as Input;
#[cfg(feature = "css")]
pub use stylist::yew::styled_component;
pub use yew::Renderer;
#[cfg(feature = "accordion")]
pub use yew_accordion::{Accordion, AccordionButton, AccordionItem};
#[cfg(feature = "alert")]
pub use yew_alert::{Alert, AlertProps};
#[cfg(feature = "i18n")]
pub use yew_i18n::{use_translation, I18nProvider, YewI18n};
#[cfg(feature = "navbar")]
pub use yew_navbar::{Menu, Navbar, NavbarProps};
pub use yew_router::prelude as router;
#[cfg(feature = "sidebar")]
pub use yew_sidebar::{MenuItem, Sidebar, SidebarProps};
pub mod prelude {
//! The Next RS Prelude
#[cfg(feature = "csr")]
pub use yew::app_handle::AppHandle;
pub use yew::callback::Callback;
pub use yew::context::{ContextHandle, ContextProvider};
pub use yew::events::*;
pub use yew::functional::function_component as func;
pub use yew::functional::*;
pub use yew::html::{
create_portal, BaseComponent, Children, ChildrenWithProps, Classes, Component, Context,
Html, HtmlResult, NodeRef, Properties, ToHtml,
};
pub use yew::macros::{classes, html as rsx, html_nested};
#[cfg(feature = "csr")]
pub use yew::renderer::{set_custom_panic_hook, Renderer};
pub use yew::suspense::Suspense;
pub use yew::virtual_dom::AttrValue;
}
pub use self::prelude::*;