Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Orbital
Leptos UI component library and design system facade — shell, themed primitives, auth hooks, and preview catalog registration.
Quick start
The crates.io package name is orbital-ui; the Rust crate root remains orbital (use orbital::...).
[]
= { = "0.1", = false, = ["hydrate"] }
= { = "0.8", = false, = ["nightly"] }
use *;
use ;
Documentation
| Resource | Description |
|---|---|
| Introduction | Design principles, tokens, typography, motion |
| Theme | Mode, density, CSS variables |
| Component preview | Full interactive catalog |
Local catalog: cargo leptos watch -p orbital-preview → http://127.0.0.1:3010/orbital/{slug}
Features
| Feature | Purpose |
|---|---|
default-features = false |
Production builds without preview catalog deps |
hydrate |
Client hydration + theme/style/shell |
ssr |
Server rendering with Axum integration |
preview |
#[component_doc] catalog metadata (doc host only) |
Use default-features = false and enable only the features you need. See orbital-macros/README.md — consumer feature flags.
Design language
Orbital defines spacing tokens, typography presets, elevation ramps, and surface materials authors compose through shared components. Read the live Introduction for principles and token chapters.
Composition
- Shell — [
OrbitalTemplate] wraps apps with theme and layout primitives. - Boot loader — [
orbital_shell] injects a WASM-free loading overlay until hydration completes (see below). - Auth — [
AuthContext] + [init_auth_resource] for session state; the preview catalog uses a stub, while integrators wire a real session server function. - Preview catalog —
#[component_doc]emits [PreviewRegistration] entries; runcargo leptos watch -p orbital-previewand browse/orbital/{slug}on:3010.
Capability flags on feature crates (for example DataTableFeatures, ChartFeatures) express optional behavior — not license-tier suffixes on type names.
Boot loader
While /pkg/*.wasm downloads and hydrate() runs, users see a static bootstrap overlay with a loading modal (progress bar and boot step checklist) instead of an unstyled, non-interactive page.
On successful hydration, [hide_boot_loader] runs a motion-aligned exit: the backdrop fades out and the modal card fades with a slight scale (PresenceMotion::fade + fade_scale CSS from orbital-motion), then data-orbital-hydrated is set and the overlay is removed. Users with prefers-reduced-motion: reduce get an instant dismiss. The error path does not animate.
Using [orbital_shell]
[orbital_shell] already wires:
- [
OrbitalBootLoaderHeadAssets] — inline critical CSS, motion presence styles, boot progress script, and load error listeners in<head> - [
OrbitalBootOverlay] —#orbital-boot-overlayin<body>after your app root (see Boot loader in the preview catalog)
Your WASM entrypoint must call [hide_boot_loader] immediately after hydration:
Custom document shells
If you do not use [orbital_shell], add the same pieces manually:
<OrbitalBootLoaderHeadAssets />in<head>after [OrbitalFirstPaintHeadAssets], before<HydrationScripts><OrbitalBootOverlay />in<body>after{app_fn()}(app root must remain the first body child for hydration)- Call [
hide_boot_loader] afterhydrate_bodyin yourhydrate()export
See orbital-preview-app/src/routes.rs and orbital-preview-frontend/src/lib.rs for the in-repo reference implementation. The Boot loader Getting Started page in the preview catalog walks through wiring and shows static loading/error demos.
Load failures
Leptos HydrationScripts does not catch failed JS/WASM loads. [OrbitalBootLoaderHeadAssets] registers inline error and unhandledrejection listeners that set html[data-orbital-boot-state="error"] and reveal a static error panel: dialog layout primitives (DialogBody, DialogTitle, DialogContent) and a [MessageBar] inside a fixed dialog surface — not the hydrated [Dialog] component (portal/focus trap).
Rust panics after WASM is running are logged via console_error_panic_hook only unless you add custom panic handling. Set a panic hook that calls [hide_boot_loader] first (see orbital-preview-frontend/src/lib.rs) so startup failures do not leave the overlay trapping the page.
Do not use hydrated components such as LoadingBar or the reactive ProgressBar component for this phase — they require WASM. The boot loader reuses progress bar and motion CSS tokens only; width and exit transitions are driven by vanilla JS.
See the repository README for workspace layout, testing, and development.