Skip to main content

dioxus_nox_core/
lib.rs

1//! # dioxus-nox-core
2//!
3//! **⚠️ Disclaimer:** This crate was entirely generated by AI (Claude) as part of a
4//! personal learning project. It has not been battle-tested in production and may
5//! contain bugs or unsound abstractions. Use at your own risk and exercise extreme
6//! caution before depending on it in anything that matters.
7//!
8//! Core utilities for dioxus-nox overlay crates (modal, drawer, cmdk).
9//!
10//! Provides:
11//! - Focus trap helpers (Tab/Shift+Tab cycling within a container)
12//! - Scroll lock (body overflow toggling)
13//! - Background inert management (marking siblings as `inert`)
14//!
15//! All functions are cross-platform with wasm32-specific implementations
16//! and no-op stubs for desktop/mobile targets.
17
18pub mod focus_trap;
19pub mod inert;
20pub mod scroll_lock;
21
22#[cfg(test)]
23mod tests;
24
25pub use focus_trap::{cycle_focus, get_focusable_elements_in_container};
26pub use inert::set_siblings_inert;
27pub use scroll_lock::{lock_body_scroll, unlock_body_scroll};