Crate floating_ui_core

Source
Expand description

Rust port of Floating UI.

This is the platform-agnostic core of Floating UI, exposing the main compute_position function but no platform interface logic.

See the Rust Floating UI book for more documenation.

See @floating-ui/core for the original package.

Modules§

middleware
Middleware implementations for compute_position.

Structs§

ComputePositionConfig
Options for compute_position.
ComputePositionReturn
Return of compute_position.
ConvertOffsetParentRelativeRectToViewportRelativeRectArgs
Arguments for Platform::convert_offset_parent_relative_rect_to_viewport_relative_rect.
DetectOverflowOptions
Options for detect_overflow.
Elements
GetClippingRectArgs
Arguments for Platform::get_clipping_rect.
GetElementRectsArgs
Arguments for Platform::get_element_rects.
MiddlewareData
Data stored by middleware.
MiddlewareReturn
Return of Middleware::compute.
MiddlewareState
State passed to Middleware::compute.
ResetValue

Enums§

Boundary
Derivable
ElementContext
Reset
ResetRects
RootBoundary

Traits§

Middleware
Middleware used by compute_position.
MiddlewareFactory
Middleware used by compute_position.
MiddlewareWithOptions
Middleware with options.
Platform
Platform interface methods to work with the current platform.

Functions§

compute_coords_from_placement
Computes the x and y coordinates that will place the floating element next to a given reference element based on a placement.
compute_position
Computes the x and y coordinates that will place the floating element next to a given reference element.
detect_overflow
Resolves with an object of overflow side offsets that determine how much the element is overflowing a given clipping boundary on each side.

Type Aliases§

DerivableFn