Expand description
§use-breakpoint
Viewport and container breakpoint primitives for RustUse UI.
§Purpose
use-breakpoint models named breakpoints, breakpoint ranges, and breakpoint sets for viewport or container sizing semantics. It is not web-specific and does not generate media queries.
§Example
use use_breakpoint::{Breakpoint, BreakpointName, BreakpointRange, BreakpointSet};
let set = BreakpointSet::defaults();
let range = BreakpointRange::new(Some(480), Some(768));
assert_eq!(set.matching(800).map(Breakpoint::name), Some(BreakpointName::Md));
assert!(range.contains(640));
assert!(!range.contains(768));§Main types
BreakpointBreakpointNameBreakpointRangeBreakpointSet
§Facade relationship
The use-ui facade exposes this crate as use_ui::breakpoint when the breakpoint or full feature is enabled.
Structs§
- Breakpoint
- A named breakpoint threshold.
- Breakpoint
Range - Inclusive lower and exclusive upper range for a breakpoint.
- Breakpoint
Set - A collection of breakpoints ordered by threshold.
Enums§
- Breakpoint
Name - Standard breakpoint labels.