use-breakpoint 0.1.0

Viewport and container breakpoint primitives for RustUse UI
Documentation
  • Coverage
  • 23.81%
    5 out of 21 items documented1 out of 15 items with examples
  • Size
  • Source code size: 6.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 538.83 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ui
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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

  • Breakpoint
  • BreakpointName
  • BreakpointRange
  • BreakpointSet

Facade relationship

The use-ui facade exposes this crate as use_ui::breakpoint when the breakpoint or full feature is enabled.