v0.1.0-alpha
官网Home
components/notification
浮层与反馈Overlays · 39 / 64

Notification

ui.widgets.Notifier

不打断当前任务的系统级通知:九种类型、进度、操作按钮、堆叠与八个停靠位置。Non-blocking notifications: nine kinds, progress, actions, stacking and eight docking positions.

BEHAVIOR CONTRACT

Notifier 管理 portal 栈、入场 / 退场、悬停展开与暂停计时、窗口尺寸变化时堆叠跟随锚点;卡片使用白玻璃材质。The Notifier owns the portal stack, enter / exit, hover-to-expand with paused timers, and keeps the stack pinned to its anchor on resize; cards use a white-glass material.

RECORDED INTERACTION

Harness 依次触发全部九种类型(进度卡跑完到成功),再连发 4 条形成堆叠,悬停展开并关闭中间一条,最后全部收起。The harness fires all nine kinds (letting the progress card finish), bursts four into a stack, expands it on hover, dismisses the middle card, then clears them all.

八个停靠位置:切换位置只改锚点、增长方向与入场方向,卡片不重建。整窗画面,因为左侧停靠位贴着窗口左缘。Eight docking positions: switching moves the anchor, growth and entrance direction without rebuilding cards. Whole-window framing, since the left positions hug the window edge.

阅读使用指南 →Read the guide →

在 GitHub 查看源码View source on GitHubexamples/storybook/notification_story.zig:290

这是 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