Expand description
§use-ui
Feature-gated facade crate for RustUse framework-neutral UI primitives.
§Purpose
use-ui gives consumers one dependency for the focused UI primitive crates in this workspace. The facade exposes natural modules such as theme, layout, interaction, affordance, and layer while keeping implementation details in the focused crates.
§Example
use use_ui::{
affordance::Affordance,
interaction::InteractionState,
layer::LayerRole,
layout::{Alignment, Direction},
theme::ThemeMode,
};
let state = InteractionState::Focused;
let direction = Direction::Vertical;
let alignment = Alignment::Center;
let layer = LayerRole::Modal;
let theme = ThemeMode::Dark;
let affordance = Affordance::Clickable;
assert!(state.is_focus_visible_candidate());
assert_eq!(direction, Direction::Vertical);
assert_eq!(alignment, Alignment::Center);
assert!(layer.sits_above(LayerRole::Popover));
assert_eq!(theme, ThemeMode::Dark);
assert_eq!(affordance, Affordance::Clickable);§Main modules
design_tokenthemelayoutspacingbreakpointviewportcomponentinteractionfocusaffordancemotionlayer
§Relationship to focused crates
Each module re-exports one focused crate. Disable default features and enable only the modules you need when a narrow facade surface is preferred. Thin facade for framework-neutral UI primitive crates.