use-focus 0.1.0

Focus metadata primitives for RustUse UI
Documentation
  • Coverage
  • 28%
    7 out of 25 items documented1 out of 18 items with examples
  • Size
  • Source code size: 6.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 695.86 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-focus

Focus metadata primitives for RustUse UI.

Purpose

use-focus describes focus state, targets, ordering, visibility, tab-index metadata, and focus scopes. It does not implement platform-specific keyboard behavior or accessibility audits.

Example

use use_focus::{FocusScope, FocusState, FocusTarget, TabIndex};

let target = FocusTarget::new("submit");
let scope = FocusScope::new(vec![target.clone()]);

assert!(FocusState::FocusVisible.has_focus());
assert!(TabIndex::new(0).is_focusable());
assert!(scope.contains(&target));

Main types

  • FocusState
  • FocusTarget
  • FocusOrder
  • FocusVisibility
  • TabIndex
  • FocusScope

Facade relationship

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