@beehexa/design-rules 2611.5.4 → 2611.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/catalog.json +908 -208
- package/dist/docs/public/_redirects +2 -2
- package/dist/docs/scripts/color-pairs.mjs +4 -0
- package/dist/docs/src/components/ChildPages.astro +8 -1
- package/dist/docs/src/components/ColorDemo.astro +12 -9
- package/dist/docs/src/components/DocsFooter.astro +1 -1
- package/dist/docs/src/components/HelpOptions.astro +8 -6
- package/dist/docs/src/components/IconBrowser.astro +2 -2
- package/dist/docs/src/components/LayoutDemo.astro +178 -99
- package/dist/docs/src/components/NativeControlsDemo.astro +165 -40
- package/dist/docs/src/components/NativeFlowDemo.astro +206 -0
- package/dist/docs/src/components/PhaseTable.astro +9 -5
- package/dist/docs/src/components/RoleGuides.astro +30 -22
- package/dist/docs/src/components/RuleDemo.astro +111 -0
- package/dist/docs/src/components/ShapeDemo.astro +24 -36
- package/dist/docs/src/components/SiteHeader.astro +1 -1
- package/dist/docs/src/components/SpacingDemo.astro +2 -0
- package/dist/docs/src/components/SwitchToggle.astro +13 -0
- package/dist/docs/src/components/SystemAreas.astro +9 -6
- package/dist/docs/src/components/TableOfContents.astro +1 -1
- package/dist/docs/src/components/TokenSearch.astro +64 -0
- package/dist/docs/src/components/TokenTable.astro +14 -9
- package/dist/docs/src/components/TypeDemo.astro +1 -1
- package/dist/docs/src/components/logos/LogoClearSpace.astro +1 -1
- package/dist/docs/src/content/components/button/accessibility.mdx +3 -3
- package/dist/docs/src/content/components/button/changelog.mdx +1 -1
- package/dist/docs/src/content/components/button/examples.mdx +10 -23
- package/dist/docs/src/content/components/button/meta.json +5 -1
- package/dist/docs/src/content/components/button/usage.mdx +13 -26
- package/dist/docs/src/content/components/resizable-panel/meta.json +5 -1
- package/dist/docs/src/content/{foundations/styles/scrollbars.mdx → components/scrollbar/code.mdx} +20 -39
- package/dist/docs/src/content/components/scrollbar/meta.json +9 -0
- package/dist/docs/src/content/components/scrollbar/usage.mdx +36 -0
- package/dist/docs/src/content/components/switch/accessibility.mdx +28 -0
- package/dist/docs/src/content/components/switch/examples.mdx +35 -0
- package/dist/docs/src/content/components/switch/meta.json +9 -0
- package/dist/docs/src/content/components/switch/usage.mdx +44 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +4 -2
- package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +1 -1
- package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +1 -1
- package/dist/docs/src/content/foundations/guidelines/content/messages.mdx +67 -0
- package/dist/docs/src/content/foundations/guidelines/content/numbers-dates-and-currency.mdx +72 -0
- package/dist/docs/src/content/foundations/guidelines/content/style-and-grammar.mdx +92 -0
- package/dist/docs/src/content/foundations/guidelines/content/terms.mdx +57 -0
- package/dist/docs/src/content/foundations/guidelines/content/voice-and-tone.mdx +48 -0
- package/dist/docs/src/content/foundations/guidelines/content.mdx +22 -17
- package/dist/docs/src/content/foundations/styles/border.mdx +5 -6
- package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +31 -7
- package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +66 -6
- package/dist/docs/src/content/foundations/styles/color/palette.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/usage.mdx +5 -5
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +33 -78
- package/dist/docs/src/content/foundations/styles/elevation.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/code.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/library.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/usage.mdx +0 -3
- package/dist/docs/src/content/foundations/styles/interaction-states.mdx +40 -14
- package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +4 -9
- package/dist/docs/src/content/foundations/styles/layout/grid.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +3 -0
- package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/motion.mdx +2 -0
- package/dist/docs/src/content/foundations/styles/radius.mdx +38 -27
- package/dist/docs/src/content/foundations/styles/size-and-density.mdx +7 -6
- package/dist/docs/src/content/foundations/styles/spacing.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/typography/code.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/typography/usage.mdx +7 -0
- package/dist/docs/src/content/foundations/styles/z-index.mdx +3 -16
- package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +51 -2
- package/dist/docs/src/content/foundations/tokens/index.mdx +91 -6
- package/dist/docs/src/content/get-started/content.mdx +25 -3
- package/dist/docs/src/content/get-started/design.mdx +34 -15
- package/dist/docs/src/content/get-started/develop.mdx +83 -28
- package/dist/docs/src/content/get-started/get-help.mdx +21 -5
- package/dist/docs/src/content/get-started/index.mdx +11 -12
- package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +176 -48
- package/dist/docs/src/content/tools/application-content.mdx +52 -13
- package/dist/docs/src/content/tools/editors.mdx +36 -28
- package/dist/docs/src/content/tools/mermaid.mdx +42 -9
- package/dist/docs/src/content/tools/vueflow.mdx +66 -7
- package/dist/docs/src/content-vi/components/button/accessibility.mdx +51 -0
- package/dist/docs/src/content-vi/components/button/changelog.mdx +6 -0
- package/dist/docs/src/content-vi/components/button/examples.mdx +27 -0
- package/dist/docs/src/content-vi/components/button/usage.mdx +31 -0
- package/dist/docs/src/content-vi/components/resizable-panel/accessibility.mdx +58 -0
- package/dist/docs/src/content-vi/components/resizable-panel/changelog.mdx +20 -0
- package/dist/docs/src/content-vi/components/resizable-panel/code.mdx +78 -0
- package/dist/docs/src/content-vi/components/resizable-panel/examples.mdx +83 -0
- package/dist/docs/src/content-vi/components/resizable-panel/usage.mdx +97 -0
- package/dist/docs/src/content-vi/components/scrollbar/code.mdx +71 -0
- package/dist/docs/src/content-vi/components/scrollbar/usage.mdx +36 -0
- package/dist/docs/src/content-vi/components/switch/accessibility.mdx +28 -0
- package/dist/docs/src/content-vi/components/switch/examples.mdx +35 -0
- package/dist/docs/src/content-vi/components/switch/usage.mdx +44 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/guidelines/content/messages.mdx +67 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/numbers-dates-and-currency.mdx +71 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/style-and-grammar.mdx +91 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/terms.mdx +57 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content/voice-and-tone.mdx +48 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +24 -19
- package/dist/docs/src/content-vi/foundations/styles/border.mdx +5 -5
- package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +30 -7
- package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +65 -6
- package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +5 -5
- package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +31 -1
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/library.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +0 -3
- package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +54 -12
- package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +4 -9
- package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +3 -0
- package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +3 -3
- package/dist/docs/src/content-vi/foundations/styles/motion.mdx +2 -0
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +38 -27
- package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +7 -6
- package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +7 -0
- package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +3 -16
- package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +51 -2
- package/dist/docs/src/content-vi/foundations/tokens/index.mdx +90 -5
- package/dist/docs/src/content-vi/get-started/content.mdx +36 -0
- package/dist/docs/src/content-vi/get-started/design.mdx +49 -0
- package/dist/docs/src/content-vi/get-started/develop.mdx +110 -0
- package/dist/docs/src/content-vi/get-started/get-help.mdx +35 -0
- package/dist/docs/src/content-vi/get-started/index.mdx +49 -0
- package/dist/docs/src/content-vi/release-phases/index.mdx +11 -0
- package/dist/docs/src/content-vi/tools/ai-agents.mdx +36 -0
- package/dist/docs/src/content-vi/tools/ant-design-vue-theme.mdx +676 -0
- package/dist/docs/src/content-vi/tools/application-content.mdx +171 -0
- package/dist/docs/src/content-vi/tools/editors.mdx +254 -0
- package/dist/docs/src/content-vi/tools/eslint.mdx +15 -0
- package/dist/docs/src/content-vi/tools/index.mdx +7 -0
- package/dist/docs/src/content-vi/tools/mermaid.mdx +179 -0
- package/dist/docs/src/content-vi/tools/stylelint.mdx +18 -0
- package/dist/docs/src/content-vi/tools/vueflow.mdx +189 -0
- package/dist/docs/src/content.config.ts +12 -1
- package/dist/docs/src/lib/dates.ts +8 -0
- package/dist/docs/src/lib/i18n.ts +1 -0
- package/dist/docs/src/lib/navigation.ts +6 -4
- package/dist/docs/src/lib/token-descriptions-vi.ts +247 -11
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/styles/chrome.css +8 -8
- package/dist/docs/src/styles/color.css +31 -31
- package/dist/docs/src/styles/docs.css +55 -40
- package/dist/docs/src/styles/elevation.css +1 -1
- package/dist/docs/src/styles/global.css +13 -4
- package/dist/docs/src/styles/icons.css +16 -16
- package/dist/docs/src/styles/kit.css +29 -10
- package/dist/docs/src/styles/layout.css +16 -11
- package/dist/docs/src/styles/logos.css +24 -24
- package/dist/docs/src/styles/opacity.css +3 -3
- package/dist/docs/src/styles/rules.css +24 -0
- package/dist/docs/src/styles/shapes.css +2 -2
- package/dist/docs/src/styles/tokens.css +228 -147
- package/dist/docs/src/styles/tokens.js +88 -62
- package/dist/docs/src/styles/typography.css +9 -9
- package/dist/docs/src/styles/zindex.css +6 -5
- package/dist/docs/tokens/color.json +24 -14
- package/dist/docs/tokens/components.json +39 -0
- package/dist/docs/tokens/content.json +103 -10
- package/dist/docs/tokens/diagram.json +490 -49
- package/dist/docs/tokens/editor.json +128 -22
- package/dist/docs/tokens/flow.json +412 -80
- package/dist/docs/tokens/layout.json +13 -4
- package/dist/docs/tokens/motion.json +11 -0
- package/dist/docs/tokens/radius.json +9 -9
- package/dist/docs/tokens/renderer.json +8 -0
- package/dist/docs/tokens/resize.json +84 -15
- package/dist/docs/tokens/scrollbar.json +42 -7
- package/dist/docs/tokens/size.json +6 -6
- package/dist/docs/tokens/spacing.json +1 -1
- package/dist/docs/tokens/switch.json +314 -59
- package/dist/docs/tokens/typography.json +1 -1
- package/dist/docs/tokens/visualization.json +465 -53
- package/dist/docs/tokens/z-index.json +0 -10
- package/dist/index.js +908 -208
- package/package.json +1 -1
- package/dist/docs/src/brand/structure-proposal.md +0 -227
- package/dist/docs/src/content/components/button/code.mdx +0 -34
|
@@ -1,40 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
---
|
|
3
3
|
import CodeExample from '../../../components/CodeExample.astro';
|
|
4
|
-
import NativeControlsDemo from '../../../components/NativeControlsDemo.astro';
|
|
5
|
-
|
|
6
|
-
## Live native control family
|
|
7
|
-
|
|
8
|
-
<NativeControlsDemo />
|
|
9
|
-
|
|
10
|
-
Real AntD components with the public source theme and CSS. Change the site's theme
|
|
11
|
-
or language to inspect the family; keyboard focus, Dropdown, search, selection,
|
|
12
|
-
clear filters and action details use real native behavior. The bordered language
|
|
13
|
-
and icon-only utility controls share page-control geometry; account actions remain
|
|
14
|
-
frameless deliberately.
|
|
15
|
-
|
|
16
|
-
The state matrix uses actual native default/primary/dashed/link/text/danger/
|
|
17
|
-
ghost Buttons, native loading/disabled props, all three native sizes and a
|
|
18
|
-
disabled native anchor. The activation counter exercises native blocking
|
|
19
|
-
behavior; hover, pressed and keyboard focus are real interactions, not painted
|
|
20
|
-
facsimiles. A dark primary is deliberately light; its resting lower shadow is
|
|
21
|
-
not blue. The same live demo includes [read-only segmented Progress](/tools/ant-design-vue-theme/#read-only-segmented-native-progress)
|
|
22
|
-
with editable real count, first/middle/final states and a native opt-out.
|
|
23
4
|
|
|
24
5
|
## Default
|
|
25
6
|
|
|
26
|
-
<CodeExample
|
|
7
|
+
<CodeExample code={`<button class="bh-button" type="button">Cancel</button>`} />
|
|
27
8
|
|
|
28
9
|
## Primary
|
|
29
10
|
|
|
30
11
|
Use one primary button for the main action on a screen.
|
|
31
12
|
|
|
32
|
-
<CodeExample
|
|
13
|
+
<CodeExample code={`<button class="bh-button bh-button-primary" type="button">Save changes</button>`} />
|
|
33
14
|
|
|
34
15
|
## Danger
|
|
35
16
|
|
|
36
|
-
<CodeExample
|
|
17
|
+
<CodeExample code={`<button class="bh-button bh-button-danger" type="button">Delete integration</button>`} />
|
|
18
|
+
|
|
19
|
+
## Subtle
|
|
20
|
+
|
|
21
|
+
For actions in a toolbar or a dense row.
|
|
22
|
+
|
|
23
|
+
<CodeExample code={`<button class="bh-button bh-button-subtle" type="button">Filter</button>`} />
|
|
37
24
|
|
|
38
25
|
## Disabled
|
|
39
26
|
|
|
40
|
-
<CodeExample
|
|
27
|
+
<CodeExample code={`<button class="bh-button bh-button-primary" type="button" disabled>Save changes</button>`} />
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Button",
|
|
3
3
|
"description": "A button triggers an action or event, such as submitting a form or opening a dialog.",
|
|
4
|
-
"group": "Actions"
|
|
4
|
+
"group": "Actions",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Nút",
|
|
7
|
+
"description": "Nút kích hoạt một thao tác, như gửi biểu mẫu hay mở hộp thoại."
|
|
8
|
+
}
|
|
5
9
|
}
|
|
@@ -11,34 +11,21 @@
|
|
|
11
11
|
- To go to another page. Use a link.
|
|
12
12
|
- For many actions in a row. Use a dropdown menu for the less common ones.
|
|
13
13
|
|
|
14
|
+
## Variants
|
|
15
|
+
|
|
16
|
+
| Variant | Use it for | Colours |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| Default | Most actions, and every secondary action next to a primary one | `color.surface`, `color.border`, `color.text` |
|
|
19
|
+
| Primary | The one main action on a screen | `color.background.primary` with `color.text.inverse`. In dark it is light graphite with dark text; that is intended, not a reason to make it blue |
|
|
20
|
+
| Danger | An action that deletes or can't be undone | `color.background.danger.bold` with `color.text.on-bold` |
|
|
21
|
+
| Subtle | Actions in a toolbar or a dense row, where a border would add noise | Transparent at rest; the neutral subtle fills on hover and when pressed |
|
|
22
|
+
|
|
23
|
+
- A button has no shadow at rest. Its only depth cue is the focus ring, which stays visible on every variant.
|
|
24
|
+
- An icon goes before the label, with the control gap (`space.control.gap`) between them. An icon-only button needs a name; see [Accessibility](/components/button/accessibility/).
|
|
25
|
+
- Loading keeps the button's colours; it doesn't fade the button. Disabled uses the disabled colours, not transparency.
|
|
26
|
+
|
|
14
27
|
## Best practices
|
|
15
28
|
|
|
16
29
|
- Start the label with a verb and keep it short: "Sync orders".
|
|
17
30
|
- Put the primary button last in a group, on the right.
|
|
18
31
|
- Ask for confirmation before destructive actions.
|
|
19
|
-
|
|
20
|
-
## One control family, role-based variants
|
|
21
|
-
|
|
22
|
-
- Language/theme utilities use native bordered `type="default"` Buttons at the
|
|
23
|
-
same size as page Button/Input/Select controls. No shell-specific skin.
|
|
24
|
-
- Account/avatar menus may legitimately use frameless `type="text"`; native Space
|
|
25
|
-
centers the Avatar and text. Do not globally turn text Buttons into default.
|
|
26
|
-
- Put icons in `#icon`, labels in one child, and name icon-only actions. The source
|
|
27
|
-
adapter supplies one scalable icon/text gap for AntD and external SVG icons.
|
|
28
|
-
- Small/default/large controls are24/32/40px at the nominal16px root; control
|
|
29
|
-
corners are radius050 (4px). Menu frames also050; Select popup remains100.
|
|
30
|
-
- Preserve hover/pressed/focus/disabled/loading and actual Dropdown open semantics.
|
|
31
|
-
`data-bh-target="responsive"` adds44px minimums only on coarse pointers.
|
|
32
|
-
- A light primary background with dark text in dark mode is the intentional
|
|
33
|
-
neutral-bold/inverse pair. Link actions keep their own link palette.
|
|
34
|
-
- A blue lower stripe on an unfocused primary Button is not a legitimate
|
|
35
|
-
variant. The source adapter removes native resting outline shadows while
|
|
36
|
-
retaining the separate gapped keyboard focus ring.
|
|
37
|
-
- Danger primary uses on-bold text; outlined/frameless danger uses readable
|
|
38
|
-
danger text. A primary danger `ghost` Button must not inherit the solid label.
|
|
39
|
-
|
|
40
|
-
The [native adapter contract](/tools/ant-design-vue-theme/#one-native-control-family-distinct-roles)
|
|
41
|
-
owns token aliases and framework state gaps. Use its live matrix rather than
|
|
42
|
-
copying a consumer shadow reset or repainting all variants alike.
|
|
43
|
-
|
|
44
|
-
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Resizable panel",
|
|
3
3
|
"description": "Two bounded, state-preserving Vue panes with an accessible pointer, touch and keyboard separator.",
|
|
4
|
-
"group": "Layout"
|
|
4
|
+
"group": "Layout",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Ô kéo giãn",
|
|
7
|
+
"description": "Hai ô Vue có giới hạn, giữ nguyên trạng thái, với thanh chia dùng được bằng con trỏ, cảm ứng và bàn phím."
|
|
8
|
+
}
|
|
5
9
|
}
|
package/dist/docs/src/content/{foundations/styles/scrollbars.mdx → components/scrollbar/code.mdx}
RENAMED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description: One native and virtual scrollbar appearance family, native ownership, root scaling and accessible platform fallbacks.
|
|
4
|
-
order: 11
|
|
2
|
+
description: Import the scrollbar CSS once and mark the elements that scroll.
|
|
5
3
|
---
|
|
6
|
-
import TokenTable from '../../../components/TokenTable.astro';
|
|
7
4
|
|
|
8
|
-
##
|
|
5
|
+
## Installation
|
|
9
6
|
|
|
10
7
|
All native-DOM scroll owners share one Beehexa scrollbar appearance, including
|
|
11
8
|
framework Table bodies, Tree/list holders, drawers and native popup portals.
|
|
@@ -95,6 +92,23 @@ Change a retained viewer's display language with Monaco's `setModelLanguage` on
|
|
|
95
92
|
its existing model. Replacing the model also replaces its native view subtree;
|
|
96
93
|
language changes are not a reason to discard retained editor/model identity.
|
|
97
94
|
|
|
95
|
+
Monaco Diff Overview is a separate two-lane change map, not another scrollbar.
|
|
96
|
+
Monaco fixes that map at 30px and gives its viewport marker the full map width,
|
|
97
|
+
without a public marker-width option. Source narrows only the visible marker to
|
|
98
|
+
`scrollbar.width`, aligns it to the inline end and applies the same normal,
|
|
99
|
+
hover and pressed thumb roles and radius. One scoped `!important` overrides
|
|
100
|
+
the native inline marker width. Both map lanes and their change markers remain;
|
|
101
|
+
native marker top/height, pointer delegation, wheel navigation and synchronized
|
|
102
|
+
original/modified scrolling are unchanged. Do not disable `renderOverviewRuler`
|
|
103
|
+
or hide a real editor/modal scrollbar to make their widths appear equal.
|
|
104
|
+
For `monaco-editor-vue3` DiffEditor, bind the Source
|
|
105
|
+
`useBeehexaMonacoDiffOptions(computedOptions)` mount callback as documented in
|
|
106
|
+
the [editor companion](/tools/editors/#public-editor-companion). Unlike its code
|
|
107
|
+
editor, that native Vue wrapper does not watch options after mount. Merely
|
|
108
|
+
passing a computed options prop leaves native scrollbar sizes stale when the
|
|
109
|
+
reader root changes. Update the retained instance; never remount it to resize.
|
|
110
|
+
|
|
111
|
+
|
|
98
112
|
## Source roles and Ant Design Vue 4 evidence
|
|
99
113
|
|
|
100
114
|
These are reusable semantic roles, not an application palette. The installed Ant
|
|
@@ -123,35 +137,6 @@ light and dark mode. Vietnamese uses the same geometry and colors; no locale-onl
|
|
|
123
137
|
scrollbar override is needed. Keep the native reader root size; `0.5rem` is nominal
|
|
124
138
|
8px, not a hardcoded root-font mandate.
|
|
125
139
|
|
|
126
|
-
## Contrast, interaction and native fallbacks
|
|
127
|
-
|
|
128
|
-
The thumb is the foreground, not the track. Keep its opaque source color visibly
|
|
129
|
-
distinguishable from the track in both themes; validate at least 3:1 for the
|
|
130
|
-
thumb/track pair when changing their source aliases. Hover and active use the
|
|
131
|
-
stronger text role, not transparency or an invented shade. Text and focus around
|
|
132
|
-
the scroller still use their own semantic foreground and focus roles. A thin bar
|
|
133
|
-
is not the only input mechanism: preserve wheel, touch, keyboard and assistive
|
|
134
|
-
technology access. Give an otherwise unreachable scroll viewport an appropriate
|
|
135
|
-
accessible name and keyboard focus as needed; do not add redundant tab stops to
|
|
136
|
-
already reachable native components.
|
|
137
|
-
|
|
138
|
-
Engines with WebKit scrollbar pseudo-elements use the token dimension for both
|
|
139
|
-
width and height, track/corner colors, full radius and real thumb hover/active.
|
|
140
|
-
The stylesheet selects that renderer with a feature query and leaves the standard
|
|
141
|
-
scrollbar properties at `auto`, because non-auto standard properties suppress
|
|
142
|
-
pseudo-element rendering in modern Chromium. Standards-only engines use native
|
|
143
|
-
`thin` geometry and the same thumb/track colors; their API does not expose radius,
|
|
144
|
-
corner or thumb hover/drag pseudo-elements, so hover/active colors follow the
|
|
145
|
-
scroll host's corresponding state. Do not claim pixel-identical geometry or
|
|
146
|
-
simulate missing thumb events in JavaScript.
|
|
147
|
-
|
|
148
|
-
OS overlay scrollbars may keep their native visibility, hit area or geometry.
|
|
149
|
-
Keep that platform behavior rather than forcing a persistent gutter, hiding bars
|
|
150
|
-
or drawing a substitute. In forced-colors mode the custom paint/geometry recipe
|
|
151
|
-
is inactive: native system scrollbar colors and dimensions remain available.
|
|
152
|
-
Unsupported engines retain their native scrollbar. None of these fallbacks is
|
|
153
|
-
permission for an application-owned competing scrollbar recipe.
|
|
154
|
-
|
|
155
140
|
## Verification
|
|
156
141
|
|
|
157
142
|
Use the built/packed imports, never copied generated CSS. Compare actual Revisions
|
|
@@ -169,8 +154,4 @@ columns or fake empty scrollbar. Source/build alone is not visual proof.
|
|
|
169
154
|
The package payload checker requires the typed `css/scrollbars` export, resolves a
|
|
170
155
|
strict side-effect import from a real extracted tarball and compares its CSS bytes
|
|
171
156
|
against `src/styles/scrollbars.css`. The complete active rule is discoverable as
|
|
172
|
-
`en/
|
|
173
|
-
|
|
174
|
-
## Tokens
|
|
175
|
-
|
|
176
|
-
<TokenTable prefix="scrollbar" />
|
|
157
|
+
`en/components/scrollbar/code` through `@beehexa/design-rules`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Scrollbar",
|
|
3
|
+
"description": "One scrollbar appearance for every area that scrolls, on top of the browser's own scrolling.",
|
|
4
|
+
"group": "Layout",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Thanh cuộn",
|
|
7
|
+
"description": "Một kiểu thanh cuộn cho mọi vùng cuộn, dựa trên cơ chế cuộn sẵn có của trình duyệt."
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
---
|
|
3
|
+
import TokenTable from '../../../components/TokenTable.astro';
|
|
4
|
+
|
|
5
|
+
## Contrast, interaction and native fallbacks
|
|
6
|
+
|
|
7
|
+
The thumb is the foreground, not the track. Keep its opaque source color visibly
|
|
8
|
+
distinguishable from the track in both themes; validate at least 3:1 for the
|
|
9
|
+
thumb/track pair when changing their source aliases. Hover and active use the
|
|
10
|
+
stronger text role, not transparency or an invented shade. Text and focus around
|
|
11
|
+
the scroller still use their own semantic foreground and focus roles. A thin bar
|
|
12
|
+
is not the only input mechanism: preserve wheel, touch, keyboard and assistive
|
|
13
|
+
technology access. Give an otherwise unreachable scroll viewport an appropriate
|
|
14
|
+
accessible name and keyboard focus as needed; do not add redundant tab stops to
|
|
15
|
+
already reachable native components.
|
|
16
|
+
|
|
17
|
+
Engines with WebKit scrollbar pseudo-elements use the token dimension for both
|
|
18
|
+
width and height, track/corner colors, full radius and real thumb hover/active.
|
|
19
|
+
The stylesheet selects that renderer with a feature query and leaves the standard
|
|
20
|
+
scrollbar properties at `auto`, because non-auto standard properties suppress
|
|
21
|
+
pseudo-element rendering in modern Chromium. Standards-only engines use native
|
|
22
|
+
`thin` geometry and the same thumb/track colors; their API does not expose radius,
|
|
23
|
+
corner or thumb hover/drag pseudo-elements, so hover/active colors follow the
|
|
24
|
+
scroll host's corresponding state. Do not claim pixel-identical geometry or
|
|
25
|
+
simulate missing thumb events in JavaScript.
|
|
26
|
+
|
|
27
|
+
OS overlay scrollbars may keep their native visibility, hit area or geometry.
|
|
28
|
+
Keep that platform behavior rather than forcing a persistent gutter, hiding bars
|
|
29
|
+
or drawing a substitute. In forced-colors mode the custom paint/geometry recipe
|
|
30
|
+
is inactive: native system scrollbar colors and dimensions remain available.
|
|
31
|
+
Unsupported engines retain their native scrollbar. None of these fallbacks is
|
|
32
|
+
permission for an application-owned competing scrollbar recipe.
|
|
33
|
+
|
|
34
|
+
## Tokens
|
|
35
|
+
|
|
36
|
+
<TokenTable prefix="scrollbar" />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: How Switch meets WCAG 2.2 AA, its keys, what it gives you and what your team does.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Conformance
|
|
6
|
+
|
|
7
|
+
**Switch meets WCAG 2.2 level AA when used as described on this page.** It follows the [Switch pattern](https://www.w3.org/WAI/ARIA/apg/patterns/switch/) of the WAI-ARIA Authoring Practices.
|
|
8
|
+
|
|
9
|
+
## Keyboard
|
|
10
|
+
|
|
11
|
+
| Key | Action |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| <kbd>Tab</kbd> | Moves focus to the switch. A disabled switch is skipped. |
|
|
14
|
+
| <kbd>Space</kbd> | Turns the setting on or off. |
|
|
15
|
+
|
|
16
|
+
## What the switch gives you
|
|
17
|
+
|
|
18
|
+
- A native `<button>` with `role="switch"` and `aria-checked`, so screen readers say the name and whether it is on.
|
|
19
|
+
- Thumb and label against their track: at least 4.5:1 in every state except disabled, in light and dark. The lowest pair measured is 5.64:1.
|
|
20
|
+
- The OFF edge against its track: at least 3:1 (WCAG 1.4.11). The lowest measured is 3.00:1, OFF on hover in light.
|
|
21
|
+
- The focus ring: at least 6.64:1 against the page, surface, subtle and overlay backgrounds.
|
|
22
|
+
- State shown by the thumb position, not by colour alone.
|
|
23
|
+
|
|
24
|
+
## What your team does
|
|
25
|
+
|
|
26
|
+
- **Name it.** The label says what the setting does: "Sync orders automatically", not "Enable". Put the label next to the switch, or set `aria-label`.
|
|
27
|
+
- **Save at once.** A switch changes the setting when it is pressed. If saving takes time, show the loading state and say when it is done or when it fails.
|
|
28
|
+
- **Don't change the label to describe the state.** "Sync is on" next to an ON switch says the same thing twice.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Live switches built from the switch tokens. Click one or press Space to turn it on or off.
|
|
3
|
+
---
|
|
4
|
+
import CodeExample from '../../../components/CodeExample.astro';
|
|
5
|
+
import SwitchToggle from '../../../components/SwitchToggle.astro';
|
|
6
|
+
|
|
7
|
+
## Off and on
|
|
8
|
+
|
|
9
|
+
Put the label next to the switch and point to it with `aria-labelledby`. Click a switch, or Tab to it and press <kbd>Space</kbd>.
|
|
10
|
+
|
|
11
|
+
<CodeExample code={`<span class="bh-switch-field">
|
|
12
|
+
<button class="bh-switch" type="button" role="switch" aria-checked="false" aria-labelledby="sw-sync"></button>
|
|
13
|
+
<span id="sw-sync">Sync orders automatically</span>
|
|
14
|
+
</span>
|
|
15
|
+
<span class="bh-switch-field">
|
|
16
|
+
<button class="bh-switch" type="button" role="switch" aria-checked="true" aria-labelledby="sw-email"></button>
|
|
17
|
+
<span id="sw-email">Email me when a sync fails</span>
|
|
18
|
+
</span>`} />
|
|
19
|
+
|
|
20
|
+
## Disabled
|
|
21
|
+
|
|
22
|
+
Use it only when the setting can't be changed right now, and say why next to it.
|
|
23
|
+
|
|
24
|
+
<CodeExample code={`<span class="bh-switch-field">
|
|
25
|
+
<button class="bh-switch" type="button" role="switch" aria-checked="false" aria-labelledby="sw-off-disabled" aria-describedby="sw-off-why" disabled></button>
|
|
26
|
+
<span id="sw-off-disabled">Sync inventory</span>
|
|
27
|
+
</span>
|
|
28
|
+
<p class="bh-switch-hint" id="sw-off-why">Turn on order sync first.</p>
|
|
29
|
+
<span class="bh-switch-field">
|
|
30
|
+
<button class="bh-switch" type="button" role="switch" aria-checked="true" aria-labelledby="sw-on-disabled" aria-describedby="sw-on-why" disabled></button>
|
|
31
|
+
<span id="sw-on-disabled">Sync orders</span>
|
|
32
|
+
</span>
|
|
33
|
+
<p class="bh-switch-hint" id="sw-on-why">Only a workspace admin can change this.</p>`} />
|
|
34
|
+
|
|
35
|
+
<SwitchToggle />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Switch",
|
|
3
|
+
"description": "A switch turns a single setting on or off, and the change takes effect at once.",
|
|
4
|
+
"group": "Forms",
|
|
5
|
+
"vi": {
|
|
6
|
+
"title": "Công tắc",
|
|
7
|
+
"description": "Công tắc bật hoặc tắt một thiết lập, và thay đổi có hiệu lực ngay."
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: When to use a switch, how it looks in each state, and the tokens it uses.
|
|
3
|
+
---
|
|
4
|
+
import TokenTable from '../../../components/TokenTable.astro';
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- To turn one setting on or off when the change takes effect at once, such as pausing a sync job.
|
|
9
|
+
|
|
10
|
+
## When not to use
|
|
11
|
+
|
|
12
|
+
- For a choice saved later with a form's Save button. Use a checkbox.
|
|
13
|
+
- For more than two options. Use radio buttons or a segmented control.
|
|
14
|
+
|
|
15
|
+
## Colours
|
|
16
|
+
|
|
17
|
+
**ON is neutral, not success. OFF is available, not disabled.**
|
|
18
|
+
|
|
19
|
+
- ON uses the colours of the primary button: the `background.neutral.bold` track with the inverse thumb and label. Never success green or brand yellow, because a switch shows a setting, not the result of an operation.
|
|
20
|
+
- OFF has the `background.neutral` track, a thumb in the icon colour and a `border.bold` edge, so people can see it is a control they can use. Don't give it the disabled colours.
|
|
21
|
+
- Each state has its own thumb colour, paired with its track, and a label colour for On and Off text when a product shows it inside a wider track. Don't put one white thumb on both tracks: on the light OFF track it disappears.
|
|
22
|
+
|
|
23
|
+
## States
|
|
24
|
+
|
|
25
|
+
All colour names below start with `color.`.
|
|
26
|
+
|
|
27
|
+
| State | OFF | ON | Other cue |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| Normal | Track `background.neutral`; thumb `icon`; label `text`; edge `border.bold` | Track and edge `background.neutral.bold`; thumb `icon.inverse`; label `text.inverse` | Thumb position and `aria-checked` |
|
|
30
|
+
| Hover | Track `.hover`; same thumb, label and edge | Track and edge `.hover`; same thumb and label | The checked state doesn't change |
|
|
31
|
+
| Pressed | Track `.pressed`; same thumb and label; edge graphite 10 | Track and edge `.pressed`; same thumb and label | The OFF edge keeps 3:1 against its pressed track |
|
|
32
|
+
| Focus | Same colours as normal | Same colours as normal | The focus ring `switch.focus-ring`, 2 px with a 2 px gap |
|
|
33
|
+
| Loading | Same colours as normal OFF | Same colours as normal ON | A spinner in `switch.{off,on}.loading-icon`; the switch can't be changed until the save ends |
|
|
34
|
+
| Disabled | The disabled colours for track, thumb, label and edge | The same disabled colours; the thumb stays in the ON position | No transparency |
|
|
35
|
+
|
|
36
|
+
ON works like the primary button: its track is graphite 12, the last step, so hover moves one step back (graphite 11) and pressed two steps back (graphite 10). The tokens already do this, in light and in dark.
|
|
37
|
+
|
|
38
|
+
## Size
|
|
39
|
+
|
|
40
|
+
The track is 36 × 20 px (`switch.size.track.width`, `switch.size.track.height`) with a 16 px thumb (`switch.size.thumb`), and both use `radius.full`. The area that responds to a click is at least 24 × 24 px, and 44 × 44 px on touch screens.
|
|
41
|
+
|
|
42
|
+
## Tokens
|
|
43
|
+
|
|
44
|
+
<TokenTable prefix="switch" />
|
|
@@ -29,8 +29,9 @@ This table explains how the standards relate. It is not a claim of conformance t
|
|
|
29
29
|
## How we check
|
|
30
30
|
|
|
31
31
|
- **Every build** checks every text, icon and border colour pair for contrast in light and dark. A pair that fails stops the build.
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
32
|
+
- **On 4 November 2026**, every page of this site was checked with axe in light and dark, and at 320 px wide.
|
|
33
|
+
- **On 6 November 2026**, all 186 pages, in English and Vietnamese, were checked again with axe against the WCAG 2.2 A and AA rules, in light and dark. The issues on this site's own pages were fixed; the ones left are listed below.
|
|
34
|
+
- Product teams follow the checks in [Testing](/foundations/guidelines/accessibility/testing/) before they ship a screen.
|
|
34
35
|
|
|
35
36
|
## Known issues
|
|
36
37
|
|
|
@@ -39,6 +40,7 @@ This table explains how the standards relate. It is not a claim of conformance t
|
|
|
39
40
|
| Vietnamese pages | Pages without a Vietnamese text show the English text, marked as English for screen readers. | In progress |
|
|
40
41
|
| Conformance report | The first accessibility conformance report (ACR), in the VPAT® format, will cover this site and Button and will be published on this page. | Planned |
|
|
41
42
|
| Screen readers | This site and Button have not been tested with NVDA, JAWS, VoiceOver or TalkBack. | Planned |
|
|
43
|
+
| Ant Design Vue theme page | In the live framework examples on this page, four selects from Ant Design Vue 4.2.6 lack `aria-expanded` and point to lists that are not in the page until they open. | In progress |
|
|
42
44
|
|
|
43
45
|
## Feedback
|
|
44
46
|
|
|
@@ -10,7 +10,7 @@ updated: 2026-11-04
|
|
|
10
10
|
|
|
11
11
|
## Before handoff (designers)
|
|
12
12
|
|
|
13
|
-
- **Contrast**: text and icons use the token pairs listed in [
|
|
13
|
+
- **Contrast**: text and icons use the token pairs listed in [colour accessibility](/foundations/styles/color/accessibility/). Check text on images and charts by hand.
|
|
14
14
|
- **Colour alone**: every status, error and selection has a word, an icon or a second cue.
|
|
15
15
|
- **Focus order**: number the Tab stops on the frame. Mark where focus goes when a dialog, drawer or menu opens and closes.
|
|
16
16
|
- **Names**: write what a screen reader should say for every icon button and image. Mark decorative images as decorative.
|
|
@@ -56,7 +56,7 @@ WCAG 2.2 AA is where we start. In four places Beehexa asks for more, because the
|
|
|
56
56
|
|
|
57
57
|
| Rule | What Beehexa asks | Why | Based on |
|
|
58
58
|
| --- | --- | --- | --- |
|
|
59
|
-
| Contrast |
|
|
59
|
+
| Contrast | Normal text at least 4.5:1; large text and meaningful UI boundaries at least 3:1 on effective backgrounds in every state. Use `color.text` for primary content and `color.text.subtle` intentionally for secondary content. Metadata roles do not imply a fixed measured ratio or a maximum contrast. Follow the [Source contrast rules](/foundations/styles/color/accessibility/). | Readable content remains readable across themes and interaction states | WCAG 1.4.3, 1.4.11 |
|
|
60
60
|
| Focus | Always visible: a 2 px ring in `color.border.focus`, 2 px away from the element (`border.width.focused`, `state.focus.offset`). | Keyboard users need to see where they are at every step | WCAG 2.4.7; 2.4.13 |
|
|
61
61
|
| Target size | At least 24 × 24 px with a mouse. On touch screens, at least 44 × 44 px (`size.target.touch`). See [Size and density](/foundations/styles/size-and-density/#target-size). | A fingertip is less precise than a pointer | WCAG 2.5.8; 2.5.5 on touch screens |
|
|
62
62
|
| Motion | When someone turns on reduced motion, movement that is not needed stops. See [Motion](/foundations/styles/motion/). | Movement can make some people dizzy or sick | WCAG 2.3.3 |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Messages
|
|
3
|
+
description: "A good message turns a problem into a next step. How to write errors, warnings, success messages, empty states and confirmations."
|
|
4
|
+
order: 4
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
It is 7 in the morning and 3 orders from last night did not reach the ERP. The person needs three things from the message: what failed, why, and what to do now. A message that gives all three gets the orders through before the shop opens.
|
|
8
|
+
|
|
9
|
+
**Every error says what happened, why, and how to fix it.**
|
|
10
|
+
|
|
11
|
+
## Choose the message
|
|
12
|
+
|
|
13
|
+
| Type | Use it when | Write |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Error | Something failed and the person has to act | What happened, why, and how to fix it |
|
|
16
|
+
| Warning | Something may go wrong if nothing changes | What may happen, and how to prevent it |
|
|
17
|
+
| Success | An action the person started has finished | What finished, in the past tense |
|
|
18
|
+
| Information | Something useful changed, and nothing needs doing | The fact, in one sentence |
|
|
19
|
+
| Empty state | A list or page has nothing to show yet | What will appear here, and how to add the first item |
|
|
20
|
+
| Confirmation | An action is hard or impossible to undo | The action, what it affects, and that it can't be undone |
|
|
21
|
+
|
|
22
|
+
## Errors
|
|
23
|
+
|
|
24
|
+
Write the three parts in this order. WCAG asks for the first and the third: say what went wrong in text (3.3.1), and suggest a fix when one is known (3.3.3).
|
|
25
|
+
|
|
26
|
+
1. **What happened,** with the object and the number: "Couldn't sync 3 orders to the ERP."
|
|
27
|
+
2. **Why,** in words the person understands: "The ERP rejected them because the customer is missing."
|
|
28
|
+
3. **How to fix it,** as an action: "Add a default customer in the connector settings, then sync again."
|
|
29
|
+
|
|
30
|
+
Put the action in a button when the product can do it: "Retry", "Reconnect ERP", "Open settings".
|
|
31
|
+
|
|
32
|
+
- **Don't blame the person.** "The file has no Order ID column", not "You uploaded the wrong file".
|
|
33
|
+
- **Don't show only an error code.** If a code helps support, put it last: "Reference: SYNC-4021."
|
|
34
|
+
- **Say what the product kept.** "Your other 21 orders synced." People need to know what is safe.
|
|
35
|
+
- **Show the error next to its cause.** A field error goes under the field. A sync error goes on the sync it belongs to.
|
|
36
|
+
|
|
37
|
+
## Warnings
|
|
38
|
+
|
|
39
|
+
Say what will happen and when, then how to avoid it: "Access to your online store expires in 3 days. Reconnect the store to keep orders syncing."
|
|
40
|
+
|
|
41
|
+
## Success
|
|
42
|
+
|
|
43
|
+
Keep it short and in the past tense: "24 orders synced", "Workflow saved". Don't add exclamation marks or words like "successfully": the past tense already says it worked.
|
|
44
|
+
|
|
45
|
+
## Empty states
|
|
46
|
+
|
|
47
|
+
Tell people what will appear and how to get there. Offer the first action as a button.
|
|
48
|
+
|
|
49
|
+
| Situation | Example |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| First use | "No workflows yet. Create a workflow to sync orders between your stores." Button: "Create workflow" |
|
|
52
|
+
| No search results | "No orders match INV-2041. Check the number or clear the filters." |
|
|
53
|
+
| Nothing to do | "No failed syncs. Everything is up to date." |
|
|
54
|
+
|
|
55
|
+
## Confirmations
|
|
56
|
+
|
|
57
|
+
Ask only before actions that are hard to undo, such as deleting or disconnecting. Asking too often teaches people to confirm without reading.
|
|
58
|
+
|
|
59
|
+
- **Title:** a question with the action and the object: "Delete this workflow?"
|
|
60
|
+
- **Body:** what else is affected, and that it can't be undone: "Its schedule and sync history are deleted too. You can't undo this."
|
|
61
|
+
- **Buttons:** repeat the verb, not "OK" or "Yes": "Delete" and "Cancel".
|
|
62
|
+
|
|
63
|
+
## Related
|
|
64
|
+
|
|
65
|
+
- [Voice and tone](/foundations/guidelines/content/voice-and-tone/): how the tone changes when things go wrong.
|
|
66
|
+
- [Color usage](/foundations/styles/color/usage/): colours for danger, warning, success and information.
|
|
67
|
+
- [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/): where focus goes when a message or dialog opens.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Numbers, dates and currency
|
|
3
|
+
description: "An amount read wrongly costs real money. Write numbers, dates, times and currency the same way on every screen, in English and Vietnamese."
|
|
4
|
+
order: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
In English, 1,250.5 is a little over a thousand. To a Vietnamese reader, the same marks can look like a number over a million. When HexaSync moves orders and invoices between systems, people check amounts and dates all day, so every screen has to write them the same way.
|
|
8
|
+
|
|
9
|
+
**Format numbers, dates and money for the language of the page, and never round data that came from another system.**
|
|
10
|
+
|
|
11
|
+
## Numbers
|
|
12
|
+
|
|
13
|
+
- **Write numbers as numerals,** even below 10: "3 orders failed", "1 store connected".
|
|
14
|
+
- **Separate thousands and decimals by language:**
|
|
15
|
+
|
|
16
|
+
| | English | Vietnamese |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| Thousands | Comma: 1,250,000 | Full stop: 1.250.000 |
|
|
19
|
+
| Decimals | Point: 1,250.5 | Comma: 1.250,5 |
|
|
20
|
+
| Percent | 25% | 25% |
|
|
21
|
+
| Range | 10 to 20 | 10 đến 20 |
|
|
22
|
+
| Part of a whole | Step 2 of 3 | Bước 2 trên 3 |
|
|
23
|
+
|
|
24
|
+
- **Four-digit numbers get a separator too:** 1,200 and 1.200.
|
|
25
|
+
- **Write ranges with a word, not a dash:** screen readers read a dash aloud as "dash". In a table or another tight space, an en dash is fine: 10–20.
|
|
26
|
+
- **Write "of", not a slash:** "Step 2 of 3", not "Step 2/3".
|
|
27
|
+
|
|
28
|
+
## Currency
|
|
29
|
+
|
|
30
|
+
The Vietnamese đồng has no minor unit, so amounts in đồng have no decimals by default.
|
|
31
|
+
|
|
32
|
+
| | English | Vietnamese |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| Đồng | ₫1,250,000 | 1.250.000 ₫ |
|
|
35
|
+
| Đồng with decimals | ₫1,250,000.223 | 1.250.000,223 ₫ |
|
|
36
|
+
| Other currencies | $1,250.50 | 1.250,50 US$ |
|
|
37
|
+
|
|
38
|
+
- **In Vietnamese, the ₫ sign goes after the amount,** with a space before it.
|
|
39
|
+
- **Totals and line amounts are shown to the whole đồng.**
|
|
40
|
+
- **Keep the decimals that came from the source system.** If a unit price or an exchange rate arrives with three decimals, show all three. Don't round data while it moves between systems: the two systems would then disagree.
|
|
41
|
+
- **When one table holds several currencies,** use the currency code instead of the sign: 1.250,50 USD, 1.250.000 VND.
|
|
42
|
+
- **Show cents only when there are some:** $1,250, not $1,250.00.
|
|
43
|
+
- **Don't shorten amounts:** 12,000, not 12k. Write "million" and "billion" in full.
|
|
44
|
+
|
|
45
|
+
These are the formats that browsers and most platforms produce for the `en` and `vi-VN` locales. Never build a number, amount or date string by hand: use the platform's formatting, such as `Intl.NumberFormat` and `Intl.DateTimeFormat` in JavaScript, and tell developers which format a design needs.
|
|
46
|
+
|
|
47
|
+
## Dates
|
|
48
|
+
|
|
49
|
+
Write the day first, then the month, then a four-digit year. The month is spelled out in English, because 05/11 means 5 November in Vietnam and 11 May in the United States.
|
|
50
|
+
|
|
51
|
+
| | English | Vietnamese |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| Tables, fields and lists | 5 Nov 2026 | 05/11/2026 |
|
|
54
|
+
| Running text | 5 November 2026 | 5 tháng 11 năm 2026 |
|
|
55
|
+
|
|
56
|
+
- **In Vietnamese, use two digits for the day and month** so dates line up in tables: 05/11/2026, not 5/11/2026.
|
|
57
|
+
- **In English, use the three-letter month** in tight spaces: Jan, Feb, Mar. Don't add a full stop after it.
|
|
58
|
+
- **Write date ranges with "to":** "5 Nov to 12 Nov 2026", "05/11/2026 đến 12/11/2026".
|
|
59
|
+
- **Join a date and a time with "at":** "5 Nov 2026 at 14:30", "14:30 ngày 05/11/2026".
|
|
60
|
+
- **Don't add ordinals:** "5 November", not "5th November".
|
|
61
|
+
- **For recent events, a relative time is easier to read:** "2 minutes ago", "2 phút trước". Show the full date and time on hover or focus, and switch to the full date after 24 hours.
|
|
62
|
+
|
|
63
|
+
## Times
|
|
64
|
+
|
|
65
|
+
- **Use the 24-hour clock:** 14:30, not 2:30 PM.
|
|
66
|
+
- **Add the time zone when people work across zones,** or when a schedule runs on a server: "Runs daily at 02:00 (GMT+7)".
|
|
67
|
+
- **Write durations in words and numbers:** "3 minutes", "1 hour 20 minutes". In tight spaces, "3 min".
|
|
68
|
+
|
|
69
|
+
## Related
|
|
70
|
+
|
|
71
|
+
- [Style and grammar](/foundations/guidelines/content/style-and-grammar/): capitals, buttons and punctuation.
|
|
72
|
+
- [Messages](/foundations/guidelines/content/messages/): how to write each kind of message.
|