Angular 时间线与进度步骤 | ng-hub-ui-milestones
Angular 时间线和进度步骤组件:垂直或水平布局,节点完全可定制,可在每个步骤内部和旁边放置内容,并通过 CSS 变量进行主题化。
样式
混入与样式
Override the `--hub-milestone-*` design tokens in a single include. Every parameter is OPTIONAL and defaults to `null`: only the parameters you pass are emitted, so the rest keep their defaults. Token-based and self-contained.
Theming with hub-milestones-theme
Kickoff
Project scoped and approved.
Build
The current step, in progress.
Launch
Not started yet.
| 混入 | 参数 | 描述 |
|---|---|---|
| Theming | ||
hub-milestones-theme() | $node-color--hub-milestone-node-color$node-text--hub-milestone-node-text$node-size--hub-milestone-node-size$node-font-size--hub-milestone-node-font-size$connector-bg--hub-milestone-connector-bg$connector-pending-bg--hub-milestone-connector-pending-bg$connector-thickness--hub-milestone-connector-thickness$pending-bg--hub-milestone-pending-bg$pending-border--hub-milestone-pending-border$pending-color--hub-milestone-pending-color$error-bg--hub-milestone-error-bg$body-color--hub-milestone-body-color$body-muted--hub-milestone-body-muted$gap--hub-milestone-gap$spacing--hub-milestone-spacing | One-call token theming for `<hub-milestones>` |
CSS 变量
用 20 个 CSS 变量为每一个像素设置主题。在 :root 处覆盖它们,或将其限定到某个容器范围内。
Milestones
Design tokens read by this component. Override them on the host element (or any ancestor) to customize; every default falls back to the ng-hub-ui-ds layer.
| 变量 | 默认值 | 类型 | 描述 |
|---|---|---|---|
--hub-milestone-body-color | var(--hub-sys-text-primary, #212529) | color | 正文主要文本颜色。 |
--hub-milestone-body-muted | var(--hub-sys-text-muted, #6c757d) | string | 弱化/次要正文文本颜色。 |
--hub-milestone-connector-bg | var(--hub-milestone-node-color) | color | 完成/激活节点之间连接线的填充。 |
--hub-milestone-connector-pending-bg | var(--hub-sys-border-color-default, #dee2e6) | color | 通向待处理节点的连接线填充。 |
--hub-milestone-connector-thickness | 3px | length | 连接导轨的粗细。 |
--hub-milestone-error-bg | var(--hub-sys-color-danger, #dc3545) | color | 错误节点的背景。 |
--hub-milestone-gap | 1rem | length | 节点导轨与正文内容之间的间隙。 |
--hub-milestone-node-color | var(--hub-sys-color-primary, #0d6efd) | color | 完成/激活状态下的节点背景。每个节点的 `color` 会覆盖此值。 |
--hub-milestone-node-font-size | 1.05rem | length | 节点内容(数字/标签)的字号。 |
--hub-milestone-node-size | 2.75rem | length | 节点圆形的直径。 |
--hub-milestone-node-text | var(--hub-ref-color-white, #ffffff) | color | 彩色节点上的节点内容颜色。 |
--hub-milestone-pending-bg | var(--hub-sys-surface-elevated, #f8f9fa) | color | 待处理节点的背景。 |
--hub-milestone-pending-border | var(--hub-sys-border-color-default, #dee2e6) | border | 待处理节点的边框颜色。 |
--hub-milestone-pending-color | var(--hub-sys-text-muted, #6c757d) | color | 待处理节点的内容颜色。 |
--hub-milestone-spacing | 1.75rem | length | 连续步骤之间的间距。 |
--hub-milestone-pulse-color | var(--hub-milestone-node-color) | color | 活动节点脉冲波的颜色。默认使用节点强调色,因此会跟随每个节点的 `color` 覆盖。 |
--hub-milestone-pulse-duration | 1.6s | transition | 一个脉冲周期的时长。 |
--hub-milestone-pulse-spread | 0.75rem | length | 脉冲波从节点向外扩散的距离。 |
--hub-milestone-reveal-duration | 0.5s | transition | 揭示过程中每个连接线填充的时长。 |
--hub-milestone-reveal-stagger | 0.14s | string | 相邻连接线填充之间的延迟,形成级联揭示效果。 |