dioxus-hoverfx
Dioxus components and native metadata for worker-first cursor hover effects.
This crate is part of the Dioxus SSR package workspace. The APIs are pre-1.0 and may change between releases while the package family stabilizes.
Release Status
- Current crate version:
0.1.0-alpha.4. - Release wave: June 8, 2026 workspace integration update.
- Publish status: Prepared as a crates.io update for this package.
- Scope: Dioxus components and native metadata for worker-first cursor hover effects.
- The README install examples and local workspace dependency requirements are aligned with this publish wave.
API Syntax Gallery
Generated from the crate's rustdoc JSON so the visible syntax tracks the public API surface used for DX review.
Checked Import Smoke Test
extern crate dioxus_hoverfx as api;
crate root
Modules
pub mod prelude;
pub mod dx;
Re-exports
pub use HoverFxCard as Card;
pub use HoverFxFalloffSelect as FalloffSelect;
pub use HoverFxProvider as HoverProvider;
pub use HoverFxRadiusSlider as RadiusSlider;
pub use HoverFxRangeSlider as RangeSlider;
pub use HoverFxShapeSelect as ShapeSelect;
pub use HoverFxStrengthSlider as StrengthSlider;
pub use HoverFxTarget as Target;
pub use dioxus_hoverfx_core::*;
Constants
pub const HOVERFX_INIT_HANDLER: &str;
pub const HOVERFX_REFRESH_HANDLER: &str;
pub const HOVERFX_RADIUS_HANDLER: &str;
pub const HOVERFX_RANGE_HANDLER: &str;
pub const HOVERFX_SHAPE_HANDLER: &str;
pub const HOVERFX_FALLOFF_HANDLER: &str;
pub const HOVERFX_STRENGTH_HANDLER: &str;
pub const HOVERFX_THEME_CHANGE_EVENT: &str;
Free Functions
hoverfx_component_manifest(config: &HoverFxConfig, policy: &HoverFxRoutePolicy) -> HoverFxManifestFragment
hoverfx_component_explain(config: &HoverFxConfig, policy: &HoverFxRoutePolicy) -> HoverFxExplainReport
hoverfx_native_integration_hints(config: &HoverFxConfig, policy: &HoverFxRoutePolicy) -> std::collections::BTreeMap<String, String>
const hoverfx_theme_token_interop() -> HoverFxThemeTokenInterop
hoverfx_runtime_mode(_config: &HoverFxConfig) -> HoverFxRuntimeMode
hoverfx_native_fallback_config() -> HoverFxConfig
hoverfx_native_compatibility_manifest() -> dioxus_native_port::VisualCompatibilityManifest
hoverfx_native_package_actions(route: Option<&str>) -> Vec<dioxus_native_port::NativePackageAction>
hoverfx_native_action(config: &HoverFxConfig, action: HoverFxNativeAction) -> dioxus_native_port::NativeActionResult
hoverfx_preset_attr(preset: HoverFxPreset) -> &'static str
hoverfx_preset_label(preset: HoverFxPreset) -> &'static str
hoverfx_shape_attr(shape: HoverFxShape) -> &'static str
hoverfx_shape_label(shape: HoverFxShape) -> &'static str
hoverfx_falloff_attr(falloff: HoverFxFalloff) -> &'static str
hoverfx_falloff_label(falloff: HoverFxFalloff) -> &'static str
hoverfx_text_contrast_attr(text_contrast: HoverFxTextContrastMode) -> &'static str
HoverFxProvider(props: HoverFxProviderProps) -> Element
HoverFxTarget(props: HoverFxTargetProps) -> Element
HoverFxCard(props: HoverFxCardProps) -> Element
HoverFxRadiusSlider(props: HoverFxRadiusSliderProps) -> Element
HoverFxRangeSlider(props: HoverFxRangeSliderProps) -> Element
HoverFxShapeSelect(props: HoverFxShapeSelectProps) -> Element
HoverFxFalloffSelect(props: HoverFxFalloffSelectProps) -> Element
HoverFxStrengthSlider(props: HoverFxStrengthSliderProps) -> Element
Types, Variants, Fields, and Methods
pub struct HoverFxThemeTokenInterop { ... }
fields:
.change_event: &'static str
.accent_token: &'static str
.muted_token: &'static str
.surface_token: &'static str
.text_token: &'static str
.sand_color_token: &'static str
.sand_highlight_token: &'static str
pub enum HoverFxRuntimeMode { ... }
variants: BrowserRuntime, StaticFallback
pub enum HoverFxNativeAction { ... }
variants: Init, Refresh, SetRadius, SetRange, SetShape, SetFalloff, SetStrength
methods:
value.as_str() -> &'static str
value.handler() -> &'static str
value.label() -> &'static str
pub struct HoverFxProviderProps { ... }
fields:
.config: HoverFxConfig
.class: String
.scope: String
.auto_init: bool
.children: Element
methods:
HoverFxProviderProps::builder() -> HoverFxProviderPropsBuilder<((), (), (), (), ())>
pub struct HoverFxTargetProps { ... }
fields:
.effect: String
.preset: Option<HoverFxPreset>
.radius: Option<u16>
.range: Option<u16>
.shape: Option<HoverFxShape>
.falloff: Option<HoverFxFalloff>
.strength: Option<f32>
.contained: bool
.controlled: bool
.text_reveal: Option<HoverFxTextRevealConfig>
.texture_reveal: Option<HoverFxTextureRevealConfig>
.sand: Option<HoverFxSandConfig>
.tooltip: Option<HoverFxTooltipConfig>
.tooltip_text: String
.tooltip_i18n_key: String
.text_contrast: Option<HoverFxTextContrastMode>
.textfx_interop: bool
.class: String
.id: String
.children: Element
methods:
HoverFxTargetProps::builder() -> HoverFxTargetPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub struct HoverFxCardProps { ... }
fields:
.effect: String
.preset: Option<HoverFxPreset>
.radius: Option<u16>
.range: Option<u16>
.shape: Option<HoverFxShape>
.falloff: Option<HoverFxFalloff>
.strength: Option<f32>
.contained: bool
.controlled: bool
.text_reveal: Option<HoverFxTextRevealConfig>
.texture_reveal: Option<HoverFxTextureRevealConfig>
.sand: Option<HoverFxSandConfig>
.tooltip: Option<HoverFxTooltipConfig>
.tooltip_text: String
.tooltip_i18n_key: String
.text_contrast: Option<HoverFxTextContrastMode>
.textfx_interop: bool
.class: String
.id: String
.children: Element
methods:
HoverFxCardProps::builder() -> HoverFxCardPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub struct HoverFxRadiusSliderProps { ... }
fields:
.handler: String
.class: String
.label: String
.value: u16
.min: u16
.max: u16
.step: u16
.apply_to_all: bool
methods:
HoverFxRadiusSliderProps::builder() -> HoverFxRadiusSliderPropsBuilder<((), (), (), (), (), (), (), ())>
pub struct HoverFxRangeSliderProps { ... }
fields:
.handler: String
.class: String
.label: String
.value: u16
.min: u16
.max: u16
.step: u16
.apply_to_all: bool
methods:
HoverFxRangeSliderProps::builder() -> HoverFxRangeSliderPropsBuilder<((), (), (), (), (), (), (), ())>
pub struct HoverFxShapeSelectProps { ... }
fields:
.handler: String
.class: String
.label: String
.value: HoverFxShape
.apply_to_all: bool
methods:
HoverFxShapeSelectProps::builder() -> HoverFxShapeSelectPropsBuilder<((), (), (), (), ())>
pub struct HoverFxFalloffSelectProps { ... }
fields:
.handler: String
.class: String
.label: String
.value: HoverFxFalloff
.apply_to_all: bool
methods:
HoverFxFalloffSelectProps::builder() -> HoverFxFalloffSelectPropsBuilder<((), (), (), (), ())>
pub struct HoverFxStrengthSliderProps { ... }
fields:
.handler: String
.class: String
.label: String
.value: u16
.min: u16
.max: u16
.step: u16
.apply_to_all: bool
methods:
HoverFxStrengthSliderProps::builder() -> HoverFxStrengthSliderPropsBuilder<((), (), (), (), (), (), (), ())>
prelude
Re-exports
pub use crate::Card as Card;
pub use crate::FalloffSelect as FalloffSelect;
pub use crate::HoverCfg as HoverCfg;
pub use crate::HoverDef as HoverDef;
pub use crate::HoverFxCard as HoverFxCard;
pub use crate::HoverFxConfig as HoverFxConfig;
pub use crate::HoverFxFalloff as HoverFxFalloff;
pub use crate::HoverFxPreset as HoverFxPreset;
pub use crate::HoverFxProvider as HoverFxProvider;
pub use crate::HoverFxRangeSlider as HoverFxRangeSlider;
pub use crate::HoverFxRenderer as HoverFxRenderer;
pub use crate::HoverFxShape as HoverFxShape;
pub use crate::HoverFxTarget as HoverFxTarget;
pub use crate::HoverFxTooltipConfig as HoverFxTooltipConfig;
pub use crate::HoverFxTooltipPlacement as HoverFxTooltipPlacement;
pub use crate::HoverProvider as HoverProvider;
pub use crate::RadiusSlider as RadiusSlider;
pub use crate::RangeSlider as RangeSlider;
pub use crate::ShapeSelect as ShapeSelect;
pub use crate::StrengthSlider as StrengthSlider;
pub use crate::Target as Target;
pub use crate::hover_def as hover_def;
pub use crate::hover_fx as hover_fx;
pub use crate::hoverfx as hoverfx;
pub use crate::hoverfx_component_explain as hoverfx_component_explain;
pub use crate::hoverfx_component_manifest as hoverfx_component_manifest;
pub use crate::hoverfx_native_integration_hints as hoverfx_native_integration_hints;
pub use dioxus_hoverfx_core::prelude::*;
dx
Re-exports
pub use crate::prelude::*;
Free Functions
hoverfx() -> dioxus_hoverfx_core::HoverFxConfig
tooltip(text: impl Into<String>) -> dioxus_hoverfx_core::HoverFxTooltipConfig
tooltip_key(key: impl AsRef<str>, fallback: impl Into<String>) -> dioxus_hoverfx_core::HoverFxTooltipConfig
localized_tooltip(key: impl AsRef<str>, fallback: impl Into<String>) -> dioxus_hoverfx_core::HoverFxTooltipConfig
effect(id: impl AsRef<str>, label: impl Into<String>) -> dioxus_hoverfx_core::HoverFxDefinition
Types, Variants, Fields, and Methods
pub trait HoverFxConfigDx { ... }
fn default(self: Self, default_effect: impl AsRef<str>) -> Self;
fn default_effect(self: Self, default_effect: impl AsRef<str>) -> Self;
fn tooltip(self: Self) -> Self;
fn tooltips(self: Self) -> Self;
Install
[]
= "0.1.0-alpha.4"
What It Provides
HoverFxProvider,HoverFxTarget, andHoverFxCardcomponents.- SSR-safe controls for radius, shape, falloff, and strength.
- Native package action metadata for init, refresh, and control updates.
- Re-exports for
dioxus-hoverfx-coreconfig, registry, presets, shapes, falloff, renderer, and helpers.
Targets
use *;
use ;
Tagged targets emit data-dxh-effect and optional override attributes for radius, shape, falloff, and strength. The runtime can activate effects when the cursor is near the target, not only after the pointer enters the element.
Controls
use *;
use ;
Controls render SSR-safe HTML using resumability attributes:
data-dxr-on-input="hoverfx.radius"data-dxr-on-change="hoverfx.shape"data-dxr-on-change="hoverfx.falloff"data-dxr-on-input="hoverfx.strength"
Each control includes stable generated ids, accessible labels, and aria-live output/current-value text.
By default, control updates preserve per-target radius, shape, falloff, and strength attributes. Set apply_to_all: true to emit data-dxh-apply-to="all" and make a lab control override every target on the page, including targets with their own preset defaults.
Native Metadata
Use hoverfx_native_package_actions(route) to advertise native-port actions for non-web shells. hoverfx_native_action returns the configured handler id and fallback mode so native hosts can mirror the same controls.
Integration Recipes
The component prelude includes the core integration helpers, so UI crates can attach route metadata next to the component config:
use *;
let config = hoverfx.with_default_effect;
let policy = hoverfx_route_policy.route;
let manifest = hoverfx_component_manifest;
let offload = hoverfx_workertown_offload_plan;
assert_eq!;
assert!;
Prefer the hoverfx_* names for new integrations. The shorter aliases such as
HoverCfg, HoverDef, and hover_fx remain available for component-heavy
code, but route manifests, cache keys, and Strata migration helpers use the
long package-prefixed names.
Workspace package dependencies:
dioxus-hoverfx-coredioxus-native-port
Feature Flags
default:webdesktop:dioxus/desktopnative:dioxus/native,dioxus-native-port/nativeserver:dioxus/serverweb:dioxus/web,dioxus-native-port/web
License
Licensed under either of:
- MIT license (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
Repository: https://github.com/Collin-Budrick/dioxus_template