v0.1.0-alpha
官网Home
components/drag
实验与能力验证Labs · 57 / 64

Drag

ui.interaction

拖拽与水平 resize 手柄。Dragging and a horizontal resize handle.

BEHAVIOR CONTRACT

pointer capture、阈值、grab / grabbing 光标与点击抑制由 interaction 模块统一处理。Pointer capture, threshold, grab / grabbing cursors and click suppression are handled by ui.interaction.

RECORDED INTERACTION

Harness 拖动方块,状态从 idle 进入 dragging。The harness drags the box; state goes idle → dragging.

在 GitHub 查看源码View source on GitHubexamples/storybook/stories.zig:4264

这是 Storybook 中该 story 的原样代码(zenit 5f9add5+wip 2026-09-30)。其中 W 即 ui.widgets,col / row / label 是 Storybook 内的布局小工具。The story's verbatim source from the Storybook (zenit 5f9add5+wip 2026-09-30). W is ui.widgets; col / row / label are small Storybook layout helpers.

zenit · 双授权Dual-licensed开源项目可按 GPL-3.0-only 免费使用;闭源或商业产品需要商业授权。Free for open-source projects under GPL-3.0-only; closed-source or commercial products need a commercial license.可联系作者:Contact the author: zongyi.xzy#gmail.com(# 换成 @) (replace # with @)zenit 5f9add5+wip 2026-09-30