Skip to main content

soma_ui/
lib.rs

1pub mod components;
2pub use components::*;
3
4pub mod charts;
5pub use charts::*;
6
7pub mod blocks;
8pub use blocks::*;
9
10pub mod screens;
11pub use screens::{DashboardScreen, LoginScreen, MobileAppScreen, SettingsScreen};
12
13/// Re-exports of the icon crates. Use `soma_ui::icons::Icon` to render an icon
14/// and `soma_ui::icons::icondata` for icon constants (e.g. `icondata::LuCheck`).
15pub mod icons {
16    pub use icondata;
17    pub use leptos_icons::Icon;
18}
19
20pub mod hooks;
21pub use hooks::*;
22
23/// Bundled stylesheet (design tokens + fonts + component utilities).
24///
25/// Inject once at your app root so every soma-ui component is styled:
26///
27/// ```rust,ignore
28/// use soma_ui::STYLES;
29/// view! { <style>{STYLES}</style> }
30/// ```
31///
32/// Alternatively, write this string to a `.css` file and serve it via your
33/// bundler (Trunk, Vite, etc.) instead of inlining it.
34///
35/// Fonts (Outfit, Rajdhani) are loaded from Google Fonts via `@import`.
36/// If you need self-hosted fonts or custom tokens, use the Tailwind path-dep
37/// workflow described in `CONSUMING.md` and regenerate with `build-css.sh`.
38pub const STYLES: &str = include_str!("../style/soma-ui.css");