Axis drag
Drag along one axis.
GUITUIRuns in the browser
axis_dragPreview












Usage example
fn axis_drag_demo() -> NodeBuilder { let width = signal(160.0_f32); let handle = container() .layout(LayoutStyle::flex_column().width(width.peek())) .child(card( text(move || format!("Width {:.0}", width.get())).nowrap(), )); axis_drag( handle, Axis::X, move || width.peek(), move |start, delta| width.set((start + delta).max(80.0)), || {}, )}fn axis_drag_demo() -> NodeBuilder { let width = signal(160.0_f32); let handle = container() .layout( LayoutStyle::flex_column() .width(width.peek()), ) .child(card( text(move || { format!( "Width {:.0}", width.get() ) }) .nowrap(), )); axis_drag( handle, Axis::X, move || width.peek(), move |start, delta| { width .set((start + delta).max(80.0)) }, || {}, )}States

Default
Hover
Dragged
API
| Name | Signature | Purpose |
|---|---|---|
axis_drag | fn axis_drag<S>(node, axis: Axis, snapshot, on_delta, on_end) -> NodeBuilder | Drag along one axis. |