Orbital Macros
Proc macros for Orbital design-system documentation and routing helpers.
Macros (this crate)
#[component_doc]
Extracts component documentation and optional preview registration metadata.
use component_doc;
Nav metadata fields: section, section_priority, category, category_priority,
category_default_collapsed, group, group_priority, nav_item. Defaults for
section/category/group ordering live in category_defaults.rs.
Consumer feature flags
Component crates expose a preview feature. When it is disabled (the default on
orbital-core-components):
#[component_doc]passes the component through without emitting doc/preview tokens.- Preview-only deps (
inventory,pulldown-cmark) are not required.
When preview is enabled, the macro emits doc constants, props metadata, preview
wrapper components, and PreviewRegistration entries for the catalog.
Production app (components only):
= { = "../orbital-core-components", = false }
# or via the facade:
= { = "../orbital", = "orbital-ui", = false, = ["hydrate"] }
Preview app / maintainer workflows:
= { = "../orbital", = "orbital-ui", = ["preview", "hydrate"] }
# or per crate:
= { = "../orbital-core-components", = ["preview"] }
Note: hydrate and ssr on several Orbital crates currently enable preview as well.
Use default-features = false and enable only the features you need if you want hydrate
without the preview catalog.
orbital_routes!
Include multiple route components inside <Routes>.
#[orbital_routes_extract]
Generate a typed paths module from a route component's view! tree.