@canonical/design-system 0.46.0 → 0.47.0
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/data/apps/pattern/data_views.ttl +85 -0
- package/data/apps/pattern/datatable.ttl +3 -73
- package/data/apps/pattern/page_header.ttl +50 -5
- package/data/apps/subcomponent/data_table-action_bar.ttl +2 -2
- package/data/apps/subcomponent/data_table-pagination_bar.ttl +2 -2
- package/data/apps/subcomponent/data_table-persistent_selection.ttl +1 -1
- package/data/apps/subcomponent/data_views-filters.ttl +13 -0
- package/data/apps/subcomponent/data_views-saved_views.ttl +13 -0
- package/data/apps/subcomponent/data_views-sort_panel.ttl +13 -0
- package/data/apps/subcomponent/side_panel-footer.ttl +1 -1
- package/data/apps_launchpad/component/modal.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/complex_multi_select.ttl +3 -3
- package/data/{apps_workplaceengineering → apps_workplace}/component/label-highlight.ttl +4 -4
- package/data/{apps_workplaceengineering → apps_workplace}/component/org_chart.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/rule.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/skip_link.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/theme_switcher.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/pattern/callout_numbers_card.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/pattern/confirmation_modal.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/pattern/org_event_card.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/subcomponent/multi_select_input.ttl +2 -2
- package/data/{apps_workplaceengineering.ttl → apps_workplace.ttl} +2 -2
- package/data/concept/Accessibility.ttl +9 -0
- package/data/concept/Breakpoints.ttl +9 -0
- package/data/concept/Design-tokens-Overview.ttl +10 -0
- package/data/concept/Filtering-patterns.ttl +0 -1
- package/data/concept/Foundations-Baseline.ttl +0 -1
- package/data/concept/Foundations-Color.ttl +10 -0
- package/data/concept/Foundations-Density--the-form-channel.ttl +0 -1
- package/data/concept/Foundations-Grid--Layout.ttl +1 -2
- package/data/concept/Foundations-Spacing/-Element-vs-container-owned.ttl +0 -1
- package/data/concept/Foundations-Spacing.ttl +0 -1
- package/data/concept/Foundations-Surfaces.ttl +0 -1
- package/data/concept/Foundations-Typography.ttl +1 -2
- package/data/concept/How-to-choose-between-question-mark-and-information-icon.ttl +10 -0
- package/data/concept/How-to-differentiate-types-of-UI-blocks-.ttl +0 -1
- package/data/concept/How-to-indicate-required-fields-in-forms.ttl +0 -1
- package/data/concept/How-to-support-modifiers-in-a-component.ttl +0 -1
- package/data/concept/Intentional-friction.ttl +0 -1
- package/data/concept/Overflow.ttl +0 -1
- package/data/concept/Understanding-the-modifier-contract.ttl +0 -1
- package/data/documentation/pattern/library_side_navigation.ttl +2 -2
- package/data/global/component/accordion.ttl +2 -2
- package/data/global/component/announcement.ttl +2 -1
- package/data/global/component/avatar.ttl +1 -1
- package/data/global/component/badge.ttl +2 -2
- package/data/global/component/breadcrumbs.ttl +3 -3
- package/data/global/component/button.ttl +3 -3
- package/data/global/component/button_link.ttl +1 -1
- package/data/global/component/card.ttl +3 -7
- package/data/global/component/chip.ttl +1 -0
- package/data/global/component/code_snippet.ttl +1 -1
- package/data/global/component/drag_and_drop_list.ttl +1 -1
- package/data/global/component/dropdown_button.ttl +2 -2
- package/data/global/component/file_upload_field.ttl +509 -60
- package/data/global/component/icon.ttl +1 -1
- package/data/global/component/icon_button.ttl +26 -4
- package/data/{apps → global}/component/key_value_pair.ttl +2 -2
- package/data/global/{subcomponent/markdown_input.ttl → component/markdown_editor_field.ttl} +3 -3
- package/data/global/component/mode_switcher.ttl +1 -1
- package/data/global/component/number_field.ttl +1 -1
- package/data/global/component/range_field.ttl +0 -80
- package/data/global/component/table.ttl +2 -2
- package/data/global/component/tile.ttl +1 -1
- package/data/global/component/tooltip.ttl +51 -91
- package/data/global/component/{data_tooltip.ttl → tooltip_data.ttl} +31 -23
- package/data/global/component/tooltip_wrapper.ttl +70 -14
- package/data/global/group/cards.ttl +1 -1
- package/data/{apps → global}/group/key_value_pairs.ttl +2 -2
- package/data/global/modifier/constructive.ttl +1 -1
- package/data/global/modifier/elevated.ttl +1 -1
- package/data/global/modifier_family/_emphasis.ttl +1 -2
- package/data/global/modifier_family/_other.ttl +1 -2
- package/data/global/modifier_family/surface.ttl +1 -1
- package/data/global/pattern/description_list.ttl +1 -1
- package/data/global/pattern/modal.ttl +1 -1
- package/data/global/pattern/timeline.ttl +1 -1
- package/data/global/pattern/{navigation.ttl → top_navigation.ttl} +2 -2
- package/data/global/subcomponent/chart_legend.ttl +1 -1
- package/data/global/subcomponent/chart_legend_item.ttl +1 -1
- package/data/global/subcomponent/file_upload_input.ttl +503 -50
- package/data/global/subcomponent/markdown_editor_input.ttl +13 -0
- package/data/global/subcomponent/modal-footer.ttl +1 -1
- package/data/global/subcomponent/number_input.ttl +1 -1
- package/data/global/subcomponent/range_input.ttl +3 -84
- package/data/global/{component/markdown_field.ttl → subcomponent/text_editor_input.ttl} +3 -3
- package/data/global/variant/tooltip_dense.ttl +86 -5
- package/data/global_dataviews/component/filter_button.ttl +487 -0
- package/data/global_dataviews/component/query_bar.ttl +1639 -0
- package/data/global_dataviews/component/query_chip.ttl +605 -0
- package/data/global_dataviews/group/query_chips.ttl +565 -0
- package/data/global_dataviews/modifier/exclusion.ttl +8 -0
- package/data/global_dataviews/modifier/inclusion.ttl +8 -0
- package/data/global_dataviews/modifier/match.ttl +8 -0
- package/data/global_dataviews/modifier/presence.ttl +8 -0
- package/data/global_dataviews/modifier/range.ttl +8 -0
- package/data/global_dataviews/modifier_family/condition.ttl +9 -0
- package/data/global_dataviews/subcomponent/query_chip-entry.ttl +186 -0
- package/data/global_dataviews/subcomponent/query_chip-segment.ttl +241 -0
- package/data/global_dataviews/subcomponent/query_input.ttl +1287 -0
- package/data/global_dataviews.ttl +6 -0
- package/data/sites/component/store_card.ttl +1 -1
- package/data/tag/{wpeinital-implementation.ttl → workplaceinitial-implementation.ttl} +2 -2
- package/data/tag/{wpetriageupstream-and-deprecate.ttl → workplacetriageupstream-and-deprecate.ttl} +2 -2
- package/definitions/ontology.ttl +8 -2
- package/package.json +6 -6
- package/skills/adoption-a1-styles/SKILL.md +11 -0
- package/skills/adoption-a2-components/SKILL.md +82 -2
- package/skills/anatomy-author/SKILL.md +278 -95
- package/skills/anatomy-author/clarification-guidelines.md +150 -0
- package/skills/anatomy-author/completeness-checklist.md +224 -0
- package/skills/implement-component/SKILL.md +2 -2
- package/skills/map-journeys/SKILL.md +395 -0
- package/skills/map-journeys/journey-graph.example.html +298 -0
- package/skills/model-domains/SKILL.md +502 -0
- package/data/concept/Question-mark-vs-information-icon.ttl +0 -11
- package/data/global/modifier/editable.ttl +0 -8
- package/data/global/modifier/focused.ttl +0 -8
- package/data/global/modifier/highlighted.ttl +0 -8
- package/data/global/modifier/loading.ttl +0 -8
- package/data/global/modifier/muted.ttl +0 -8
- package/data/global/modifier/wireframe.ttl +0 -8
|
@@ -7,8 +7,8 @@ ds:global.component.breadcrumbs a ds:Component;
|
|
|
7
7
|
ds:summary "Breadcrumbs are a navigational aid that shows users their current location within a product’s information hierarchy. They provide a clear path from the root of the information architecture (IA) to the current page, allowing users to quickly understand where they are and easily navigate back to previous levels in the IA. Breadcrumbs should reflect the IA, not the user's path they took to arrive at the current page. They work best in websites or applications with multiple levels of hierarchy and are particularly useful when users might arrive at deep pages through search or external links.";
|
|
8
8
|
ds:anatomyDsl "---\n# Authored 2026-09-13 from @canonical/react-ds-global src/lib/component/Breadcrumbs/styles.css on .ds.breadcrumbs\n# The root <nav> carries no declaration of its own; every style below sits on\n# the `.list` <ol> the component renders inside it.\nnode:\n uri: global.component.breadcrumbs\n edges:\n - node:\n role: list\n styles:\n layout.type: flex\n layout.direction: row\n layout.wrap: wrap\n layout.align: center\n # Reset of the <ol> defaults.\n spacing.external.block.start: 0\n spacing.external.block.end: 0\n spacing.external.inline.start: 0\n spacing.external.inline.end: 0\n spacing.internal.block.start: 0\n spacing.internal.block.end: 0\n spacing.internal.inline.start: 0\n spacing.internal.inline.end: 0\n layout.listStyle: none\n spacing.gap.block: dimension.050 # row-gap reads --dimension-050 direct: 4px between wrapped rows\n edges:\n # Each item may be replaced per item by a consumer-supplied component\n # (BreadcrumbItem.Component) — kept from the previous notation, and\n # the reference confirms it.\n - switch:\n on: override\n cases:\n - uri: global.subcomponent.breadcrumbs-item\n - uri: $custom\n relation:\n cardinality: \"1..*\"\n slotName: default\n relation:\n cardinality: \"1\"\n slotName: default\n";
|
|
9
9
|
ds:anatomyClassic "\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=2121-7411&t=ZjF1qUMIhrKHbBRE-1\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=2481-2182&t=ZjF1qUMIhrKHbBRE-1";
|
|
10
|
-
ds:usage "Breadcrumbs are used to represent the hierarchical structure of content within an application or website, helping users understand where they are in the information architecture (IA). They provide a visual trail of the user's current location and offer quick navigation to other levels in the IA. \n\nBreadcrumbs reflect the site's structure, not the path a user took to arrive at the current page. They show where you are in the hierarchy, not how you got there.\n\nThey are most effective in applications or websites with substantial content organized hierarchically across two or more levels. The more complex your information architecture, the more valuable breadcrumbs become for helping users maintain context and navigate efficiently.\n\n### When to use\n\n- In applications or websites with multiple levels of hierarchical content structure\n- To help users understand their current location within a deep information architecture\n- To provide quick navigation back to higher levels in the IA\n- When the relationship between pages follows a clear parent-child hierarchy\n- As a secondary navigation aid to complement your primary navigation\n\n### When not to use\n\n- On websites or applications with only a single level of hierarchy.\n - Incorrect: Displaying a breadcrumb that only shows \"Home\" on every page of a single-page application.\n - Remediation: Remove the component entirely, as the global navigation or page header is sufficient for navigation.\n- On the root of your site or app (as there are no higher levels to navigate to).\n - Incorrect: Placing a breadcrumb on the home screen where there are no parent levels to navigate back to.\n - Remediation: Omit the component entirely.\n- As a replacement for primary navigation. \n - Incorrect: Removing the [
|
|
11
|
-
ds:guidelines "- use current page breadcrumb item as the last level of hierarchy, indicating the current location in the navigation structure\n- use parent page breadcrumb items for the higher levels of navigation from the current location in the navigation structure \n\n\nOverflow\n\n- Ideally breadcrumbs should be used in the design in a way where they do not overflow. But if they do for some reason overflow they should overflow in the following way: A 4px vertical distance. The slash should always be at the start of the second line (and not at the end of the first line)
|
|
10
|
+
ds:usage "Breadcrumbs are used to represent the hierarchical structure of content within an application or website, helping users understand where they are in the information architecture (IA). They provide a visual trail of the user's current location and offer quick navigation to other levels in the IA. \n\nBreadcrumbs reflect the site's structure, not the path a user took to arrive at the current page. They show where you are in the hierarchy, not how you got there.\n\nThey are most effective in applications or websites with substantial content organized hierarchically across two or more levels. The more complex your information architecture, the more valuable breadcrumbs become for helping users maintain context and navigate efficiently.\n\n### When to use\n\n- In applications or websites with multiple levels of hierarchical content structure\n- To help users understand their current location within a deep information architecture\n- To provide quick navigation back to higher levels in the IA\n- When the relationship between pages follows a clear parent-child hierarchy\n- As a secondary navigation aid to complement your primary navigation\n\n### When not to use\n\n- On websites or applications with only a single level of hierarchy.\n - Incorrect: Displaying a breadcrumb that only shows \"Home\" on every page of a single-page application.\n - Remediation: Remove the component entirely, as the global navigation or page header is sufficient for navigation.\n- On the root of your site or app (as there are no higher levels to navigate to).\n - Incorrect: Placing a breadcrumb on the home screen where there are no parent levels to navigate back to.\n - Remediation: Omit the component entirely.\n- As a replacement for primary navigation. \n - Incorrect: Removing the [TopNavigation](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-_D-3DMJEui) (side navigation or top navigation) and forcing users to rely on breadcrumbs to find their way around the site.\n - Remediation: Use the right [Navigation](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-nkDiZdUMkV) pattern for primary orientation. Breadcrumbs are always secondary and should enrich, not replace, your main navigation.\n- To track a user's browsing history or the path they took through your application.\n - Incorrect: Showing a path like \"Home > Search > Profile > Search\" based on the user's back-and-forth browsing behavior.\n - Remediation: Use the browser's back button or a dedicated \"Back to results\" link to handle session-based movement.\n- As a progress indicator for multi-step processes.\n - Incorrect: Using Breadcrumbs to show steps 1, 2, and 3 of a checkout or registration form.\n - Remediation: Use a component able to represent progress to clearly communicate the sequence and status of a multi-step task.\n\n";
|
|
11
|
+
ds:guidelines "- use current page breadcrumb item as the last level of hierarchy, indicating the current location in the navigation structure\n- use parent page breadcrumb items for the higher levels of navigation from the current location in the navigation structure \n\n\nOverflow\n\n- Ideally breadcrumbs should be used in the design in a way where they do not overflow. But if they do for some reason overflow they should overflow in the following way: A 4px vertical distance. The slash should always be at the start of the second line (and not at the end of the first line).\n\n# Accessibility\n\n## **How it works**\n\nIt establishes a landmark on the page which assists the user in understanding where they currently are and which pages exist in the current page’s hierarchical order.\n\nIt comprises a set of links structured using an ordered list. A `nav` element using `aria-label=\"Breadcrumbs\"` identifies the structure as a breadcrumb trail and makes it a navigation landmark so that it is easy to locate. It can be navigated via keyboard using the `Tab` key.\n\nTo prevent screen reader announcement of the visual separators between links, they are added via CSS. The separators are part of the visual presentation that signifies the breadcrumb trail, which is already semantically represented by the `nav` element.\n\n## **Considerations**\n\nThis component strives to follow [WCAG 2.2 (level AA) guidelines](https://www.w3.org/TR/WCAG22/), and care must be taken to ensure this effort is maintained when the component is implemented across other projects. This section offers advice to that effect:\n\n- The breadcrumb text should reflect the page title accurately and concisely.\n- The breadcrumb should remain in the same relative order and location on each web page.\n- The breadcrumb indicating the current page should be visually distinct from the preceding breadcrumbs.\n- If the breadcrumb reflecting the current page is a link, it should have an `aria-current=\"page\"` attribute.\n\n## **Resources**\n\n- [WAI-ARIA practices: Breadcrumbs](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/)\n- [WAI-ARIA practices: Breadcrumb example](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/)\n- Guidelines:\n - [2.4.4: Link Purpose (in Context)](https://www.w3.org/TR/WCAG22/#link-purpose-in-context)\n - [3.2.3: Consistent Navigation](https://www.w3.org/TR/WCAG22/#consistent-navigation)";
|
|
12
12
|
ds:tier ds:global;
|
|
13
13
|
ds:documentationStage ds:tag.needsfulldocumentation;
|
|
14
14
|
ds:hasProperty [
|
|
@@ -17,6 +17,7 @@ ds:global.component.breadcrumbs a ds:Component;
|
|
|
17
17
|
ds:propertyType "node";
|
|
18
18
|
ds:optional "false"
|
|
19
19
|
];
|
|
20
|
+
ds:hasSubcomponent ds:global.subcomponent.breadcrumbs-item;
|
|
20
21
|
ds:changeLog [
|
|
21
22
|
a ds:ChangeLogEntry;
|
|
22
23
|
ds:timestamp "2026-01-19T00:00:00.000+01:00";
|
|
@@ -29,7 +30,6 @@ ds:global.component.breadcrumbs a ds:Component;
|
|
|
29
30
|
a ds:ChangeLogEntry;
|
|
30
31
|
ds:timestamp "2026-10-14T00:00:00.000+02:00"
|
|
31
32
|
];
|
|
32
|
-
ds:hasSubcomponent ds:global.subcomponent.breadcrumbs-item;
|
|
33
33
|
ds:hasTokenBinding [
|
|
34
34
|
a ds:TokenBinding;
|
|
35
35
|
ds:viaBlock ds:global.component.breadcrumbs;
|
|
@@ -8,7 +8,7 @@ ds:global.component.button a ds:Component;
|
|
|
8
8
|
ds:anatomyDsl "---\n# Authored 2026-09-13 from @canonical/react-ds-global src/lib/component/Button/styles.css on .ds.button\n# Every list is the reference's own var() chain, in order. The button reads the\n# modifier CHANNEL generically — it knows no particular importance class — so\n# the channel is consumed by name wherever the implementation reads it.\nnode:\n uri: global.component.button\n styles:\n layout.position: relative\n layout.type: inline-flex\n layout.align: center\n layout.justify: center\n interaction.cursor: pointer\n interaction.cursor@disabled: not-allowed\n appearance.border.style: solid\n appearance.border.width: dimension.stroke.thickness.medium\n # The primary foreground fills the background, through the channel that\n # importance provides it on.\n # reads --modifier-surface first; no symbol declares it.\n appearance.background: [modifier.color.foreground.primary, color.foreground.primary]\n # reads --modifier-surface-hover / -active / -disabled first; no symbol\n # declares any of the three.\n appearance.background@hover: color.foreground.primary.hover\n appearance.background@active: color.foreground.primary.active\n appearance.background@disabled: color.foreground.primary.disabled\n # The border is always present at the nominal width and colour-mixed to\n # transparent when the importance hides it; --modifier-outline is the 0/1\n # flag that does the mixing, and no symbol declares it.\n appearance.border.color: [modifier.color.border, color.border.highlighted, color.border]\n # reads --modifier-color-border-disabled first; no symbol declares it.\n appearance.border.color@disabled: color.border.highlighted.disabled\n typography.color: [modifier.color.text, color.text]\n # reads --modifier-color-text-disabled first; no symbol declares it.\n typography.color@disabled: color.text.disabled\n # The label is the typography.text.primary composite: family, size,\n # weight and letter-spacing all come from it.\n typography.font: typography.text.primary\n typography.align: center\n typography.decoration: none\n spacing.gap: dimension.100 # --button-gap, between the icon and the label\n # 16px each side, the action inset the button plays. A leading icon tightens\n # the start side to --dimension-100, which is a conditional the anatomy does\n # not carry.\n spacing.internal.inline.start: dimension.200 # --button-padding-inline-start\n spacing.internal.inline.end: dimension.200 # --button-padding-inline-end\n motion.property: \"background-color, color, border-color\"\n # The transition reads --motion-duration-fast and --motion-easing-standard;\n # both bindings are dropped because no symbol declares either name and\n # neither var() carries a literal fallback.\n # reads --focus-outline-width first; no symbol declares it, so the chain's\n # own literal is what is left.\n appearance.outline.width@focus: 2px\n appearance.outline.style@focus: solid\n appearance.outline.color@focus: [modifier.color.focusRing, color.focusRing, currentColor]\n # reads --focus-outline-offset first; no symbol declares it.\n appearance.outline.offset@focus: 2px\n # The `.link` variant (transparent chrome, underlined link text) is the\n # separate ButtonLink block (ds:global.component.button_link), not a case\n # of this tree.\n edges:\n - node:\n role: icon\n styles:\n layout.type: inline-flex\n layout.align: center\n layout.alignSelf: center\n layout.justify: center\n layout.flex.shrink: 0\n # reads --icon-size, a component-local size declared as 1em at :root.\n size.width: 1em\n size.height: 1em\n # The icon has its own colour channel, distinct from the label's, and\n # falls through to the colour it inherits.\n typography.color: [modifier.color.icon, modifier.color.text, currentColor]\n # reads --modifier-color-icon-disabled first; no symbol declares it.\n typography.color@disabled: color.icon.disabled\n relation:\n cardinality: \"0..1\"\n slotName: icon\n - node:\n role: label text\n relation:\n cardinality: \"1\"\n slotName: label\n - node:\n role: loading spinner\n styles:\n layout.position: absolute\n layout.type: inline-flex\n layout.align: center\n layout.justify: center\n layout.offset.top: 0\n layout.offset.right: 0\n layout.offset.bottom: 0\n layout.offset.left: 0\n relation:\n # Present only while loading, when the icon and the label stay in the\n # DOM at `visibility: hidden` so the button keeps its width.\n cardinality: \"0..1\"";
|
|
9
9
|
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=2093-5214&t=hZuG5NMGmwurwbXa-1\n\nStyling \nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=2378-8459&t=hZuG5NMGmwurwbXa-1";
|
|
10
10
|
ds:usage "Use buttons for meaningful interactions that transform, submit, or manipulate data, such as: \n\n- Submitting forms\n- Deleting items\n- Processing payments\n- Updating settings\n\nActions represent state changes in the application rather than simple navigation.\n\nButtons help establish clear visual hierarchy by signaling the most important actions available to users at any given moment. This hierarchy is critical to effective interface design. Users should immediately understand what action they're expected to take. \n\nWhile buttons should primarily trigger actions, they can occasionally be used for navigation when the context demands it. This is most appropriate for high-priority conversion points, such as call-to-action buttons in hero sections that direct users to, for example, sign-up flows or landing pages. In these cases, the button represents a key user journey rather than standard navigation. \n\n### When to use\n\n- For actions that transform, submit, or manipulate data\n- To draw attention to the most important action on a page or section\n- For high-priority conversion points or key user journeys\n- When the interaction represents a meaningful state change in the application\n\n### When not to use\n\n- For simple navigation between pages (use links instead)\n- When you already have a primary button visible in the current viewport (consider using secondary or tertiary button styles instead)\n- For multiple competing actions of equal importance (reconsider your information architecture and prioritize one clear primary action)\n\n### Call to actions\n\nAlmost always, there is an action that the user needs to perform on a page. Guide users toward the main action within the user flow that you have designed. **This means being opinionated about what action the user should be performing and using that as the primary call to action.** Rather than presenting users with an overwhelming array of choices, you should clearly signal the intended path forward. As a result, the main action on any given page should, in most cases, be represented by a primary button.\n\nBe deliberate about the number of calls-to-action you present. Each additional CTA dilutes the user's focus and makes it harder for them to decide what to do. Ideally, limit pages to as few CTAs as possible so users clearly understand their intended path forward. **As a rule of thumb, there should almost never be more than one primary button visible in the user's viewport at a time.** \n\nWhen multiple primary buttons compete for attention simultaneously, the hierarchy collapses and users face decision paralysis. If you find yourself needing multiple primary actions in view, reconsider whether they're all truly primary and whether some could be deprioritized or removed entirely.";
|
|
11
|
-
ds:guidelines "# Button hierarchy\n\nEach button variant signals a different level of emphasis. Choose the variant that matches the role of the action on the page.\n\n\n\n**Primary**\n\nUse the primary variant for primary calls to action. Typical examples include the main action on an app’s table page, the hero call to action on a website. It also confirms non-destructive actions, such as submitting a form or proceeding to the next step.\n\n**Secondary**\n\nUse the secondary variant for secondary actions paired with a primary button. Apply it when no single action on the page should dominate. Use it when all actions share the same level of importance, or when the user may or may not choose to act.\n\n**Tertiary**\n\nUse the tertiary variant for tertiary actions paired with a more prominent button, such as “Back” or “Cancel”. It holds the lowest level of emphasis, so only use it when the element is clearly a button. In practice, this means pairing it with other buttons. Icon-only buttons are often base buttons.\n\n \n**Brand**\n\nUse the brand variant for actions and call to actions that live in an editorial setting, like sites or documentation tiers. All button levels are available as a brand version.\n\n**Anticipation modifier family**\n\n**Constructive**\n\nUse the constructive modifier for buttons whose actions create something new, such as a new instance, a new machine, or a new row, if you need to emphasize the constructive/additive nature of it. \n \n**Destructive**\n\nUse the the destructive modifier to warn the user that a destructive, irreversible action will be triggered.\n\n\n\n**Combinations**\n\nShow at most one primary button, whether default or using modifiers, in a given view. Supplement it with secondary or tertiary buttons as needed, and make sure the primary button reflects the main action you want the user to take. If all actions share the same level of importance and you do not want to direct the user to a specific one, use secondary buttons. Always pair tertiary buttons with other buttons. \n\n\n# Button order and alignment\n\n~~Right-align buttons when:~~\n\n- ~~The action moves the user forward in a flow, such as forms, wizards, or checkout~~\n- ~~The button appears in a modal dialog or confirmation window~~\n- ~~The button appears in a settings or configuration panel~~\n- ~~The button completes or submits something~~\n- ~~The position follows the natural end of task after scanning content left to right~~\n\n~~Left-align buttons when:~~\n\n- ~~The button continues left-aligned content, such as a hero, card, or marketing block~~\n- ~~The action is a “Back” or “Cancel” that returns users to a previous state~~\n- ~~The button appears in an article page or a content-heavy context where buttons are secondary to the text~~\n\n# [IconButton](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-1G-7Wdwa2L) \n\nWhen space is limited and the actions have recognizable icons, buttons may use an icon without text. Reserve for very common actions such as delete, edit, or close. Always pair an icon-only button with a [Tooltip](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-ONb9LwkGvW) that states the action clearly.
|
|
11
|
+
ds:guidelines "# Button hierarchy\n\nEach button variant signals a different level of emphasis. Choose the variant that matches the role of the action on the page.\n\n\n\n**Primary**\n\nUse the primary variant for primary calls to action. Typical examples include the main action on an app’s table page, the hero call to action on a website. It also confirms non-destructive actions, such as submitting a form or proceeding to the next step.\n\n**Secondary**\n\nUse the secondary variant for secondary actions paired with a primary button. Apply it when no single action on the page should dominate. Use it when all actions share the same level of importance, or when the user may or may not choose to act.\n\n**Tertiary**\n\nUse the tertiary variant for tertiary actions paired with a more prominent button, such as “Back” or “Cancel”. It holds the lowest level of emphasis, so only use it when the element is clearly a button. In practice, this means pairing it with other buttons. Icon-only buttons are often base buttons.\n\n \n**Brand**\n\nUse the brand variant for actions and call to actions that live in an editorial setting, like sites or documentation tiers. All button levels are available as a brand version.\n\n**Anticipation modifier family**\n\n**Constructive**\n\nUse the constructive modifier for buttons whose actions create something new, such as a new instance, a new machine, or a new row, if you need to emphasize the constructive/additive nature of it. \n \n**Destructive**\n\nUse the the destructive modifier to warn the user that a destructive, irreversible action will be triggered.\n\n\n\n**Combinations**\n\nShow at most one primary button, whether default or using modifiers, in a given view. Supplement it with secondary or tertiary buttons as needed, and make sure the primary button reflects the main action you want the user to take. If all actions share the same level of importance and you do not want to direct the user to a specific one, use secondary buttons. Always pair tertiary buttons with other buttons. \n\n\n# Button order and alignment\n\n~~Right-align buttons when:~~\n\n- ~~The action moves the user forward in a flow, such as forms, wizards, or checkout~~\n- ~~The button appears in a modal dialog or confirmation window~~\n- ~~The button appears in a settings or configuration panel~~\n- ~~The button completes or submits something~~\n- ~~The position follows the natural end of task after scanning content left to right~~\n\n~~Left-align buttons when:~~\n\n- ~~The button continues left-aligned content, such as a hero, card, or marketing block~~\n- ~~The action is a “Back” or “Cancel” that returns users to a previous state~~\n- ~~The button appears in an article page or a content-heavy context where buttons are secondary to the text~~\n\n# [IconButton](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-1G-7Wdwa2L) \n\nWhen space is limited and the actions have recognizable icons, buttons may use an icon without text. Reserve for very common actions such as delete, edit, or close. Always pair an icon-only button with a [Tooltip](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-ONb9LwkGvW) that states the action clearly. Add a delay to the [Tooltip](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-ONb9LwkGvW) so it does not interrupt the user.\n\n# When to disable buttons\n\nYou should keep buttons enabled by default so users always know how to proceed. Disable a button only when the action is clearly unavailable and the reason why it is unavailable is clear. You must ensure users understand why it is disabled and how to move forward. Pair the disabled button with a [Tooltip](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-ll01ZL3SIS) that explains why the action is unavailable. \n\n### In action bars\n\nDisabling a button in an [ActionBar](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-DNCIjMUiuB) is allowed once all alternative options to keep the button enabled or remove the button completely have been discarded. The disabling rule also applies to actions available through a contextual menu.\n\nIf an action is not available, the button can be kept enabled and clicking it should trigger a modal with more information and an potential solution action. However, keeping the button enabled may cause confusion and repeated erroneous clicks by the user. \n\n### In forms\n\nBy default , buttons should not be disabled in forms. In forms you may disable a button only in situations where the form is short and all the required fields are visible without scrolling. \n\nThis matters most for form submissions. Users may miss a required field in longer or more complex forms, so a disabled submit button can leave them stuck without a clear reason. If you disable the button, make the cause visible; otherwise, keep it enabled and let validation feedback guide users to the mistake. \n\n# Dual buttons\n\nOpposing actions can sometimes be combined into a single button, such as play and pause in a video player. The icon or label should reflect the action that will occur when the user presses the button. If the media is playing, show the pause icon. If it is paused, show the play icon. This aligns with user intent, because users select an action, not a status.\n\n# Text in buttons\n\nWrite button labels as a verb plus noun in sentence case, with no punctuation. Use clear, action-oriented language that names the outcome, such as \"Get Ubuntu Pro\" rather than a generic \"Submit\". When a button relates to a nearby heading, match the language so the action reads as a direct answer. For example, on a card with the heading \"Would you like to save your changes?\", label the button \"Save changes\".\n\n# Accessibility\n\n## Built-in\n\n### Semantic foundation: HTML and Aria labels\n\n- In some contexts, it may be necessary to indicate to the user that a button is in a pressed state, such as when a button opens a contextual menu. This can be done by adding `aria-pressed=\"true\"` to the button with JavaScript when the button is clicked, and removed when necessary.\n- Loading buttons use `aria-busy=\"true\"` to indicate loading/pending state to screen readers. While loading, the interactions are blocked and the componet uses `aria-disabled=\"true\"` to indicate the element is not currently interactive. The buttons should not become `disabled` while loading, because this would drop focus for keyboard/screen reader users. \n\n### Visual and motion\n\n- Text color ensures 4.5:1 contrast with the foreground, and foreground color ensures3 :1 contrast with the background\n- Animations are disabled when `prefers-reduced-motion: reduce` is set\n\n### \n\n## Consumer responsibilities\n\n### **Keyboard navigation and focus order** \n\n- As the button is interactable it should be focused.\n- After the button is activated ensure the focus is set correctly based on the type of action the button performs. See [W3C WAI-ARIA Authoring Practices Button Design Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/) for a list of examples.\n- Once focussed, the associated action should be executed if the `Enter` or `Space` key is pressed.\n\n\n\n## Accessibility references\n\nFor loading/disabled settings:\n\n- [MDN reference](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-busy)\n- [Example of another DS that does this](https://diceui.com/docs/utilities/radix/pending#accessibility)";
|
|
12
12
|
ds:tier ds:global;
|
|
13
13
|
ds:documentationStage ds:tag.needsfulldocumentation;
|
|
14
14
|
ds:hasProperty [
|
|
@@ -47,6 +47,7 @@ ds:global.component.button a ds:Component;
|
|
|
47
47
|
ds:defaultValue "default";
|
|
48
48
|
ds:constraints "[default, special, exceptional]"
|
|
49
49
|
];
|
|
50
|
+
ds:hasModifierFamily ds:global.modifier_family.importance, ds:global.modifier_family.anticipation;
|
|
50
51
|
ds:changeLog [
|
|
51
52
|
a ds:ChangeLogEntry;
|
|
52
53
|
ds:timestamp "2026-02-20T00:00:00.000+01:00";
|
|
@@ -56,8 +57,7 @@ ds:global.component.button a ds:Component;
|
|
|
56
57
|
ds:timestamp "2026-03-06T11:00:00.000+01:00";
|
|
57
58
|
ds:changeType "decision"
|
|
58
59
|
];
|
|
59
|
-
ds:
|
|
60
|
-
ds:specializedBy ds:global.component.dropdown_button;
|
|
60
|
+
ds:specializedBy ds:global_dataviews.component.filter_button, ds:global.component.icon_button, ds:global.component.dropdown_button;
|
|
61
61
|
ds:hasTokenBinding [
|
|
62
62
|
a ds:TokenBinding;
|
|
63
63
|
ds:viaBlock ds:global.component.button;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
ds:global.component.button_link a ds:Component;
|
|
6
6
|
ds:name "ButtonLink";
|
|
7
|
-
ds:summary "";
|
|
7
|
+
ds:summary "reference: [https://github.com/canonical/design-system/discussions/8](https://github.com/canonical/design-system/discussions/8)";
|
|
8
8
|
ds:anatomyDsl "";
|
|
9
9
|
ds:anatomyClassic "";
|
|
10
10
|
ds:usage "";
|
|
@@ -4,17 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
ds:global.component.card a ds:Component;
|
|
6
6
|
ds:name "Card";
|
|
7
|
-
ds:summary "
|
|
7
|
+
ds:summary "A card is a container that represents one data object in a structure shared by every card in its set. Unlike the more flexible Tile, cards are shown side by side, so their predictable structure lets users compare attributes across objects. Use it for machines, images or plans, where each object has the same fields.";
|
|
8
8
|
ds:anatomyDsl "---\n# Authored 2026-09-13 from @canonical/react-ds-global src/lib/component/Card/styles.css on .ds.card\n# The Card is not a surface: it sets no background, so it reads flush on\n# whatever surface it sits on and stays delimited by its border, its radius and\n# the dividers between its sections. It is always a grid participant and a ROW\n# SUBGRID over four fixed section tracks — image, header, content, footer.\nnode:\n uri: global.component.card\n styles:\n layout.type: grid\n layout.grid.rows: subgrid\n layout.grid.columns: \"minmax(0, 1fr)\"\n # Spans --card-span parent columns (a component-local count, default 1) and\n # its own four section rows.\n layout.grid.column: \"span 1\"\n layout.grid.row: \"span 4\"\n appearance.border.width: dimension.stroke.thickness.medium\n appearance.border.style: solid\n appearance.border.color: color.border.muted\n appearance.radius: dimension.radius.medium\n # Clips section corners (a full-bleed image) to the card radius.\n layout.overflow: hidden\n edges:\n # Each section sits on its fixed row track and spans the card's single\n # column. An absent section leaves its track empty for this card only.\n # Image, content and footer draw a divider on their block-end edge when\n # they are not the last section; the header draws none, so title and\n # content read as one region.\n - node:\n uri: global.subcomponent.card-image\n styles:\n layout.grid.row: \"1\"\n layout.grid.column: \"1 / -1\"\n appearance.border.bottom.color: color.border.muted\n relation:\n cardinality: \"0..1\"\n slotName: media\n - node:\n uri: global.subcomponent.card-header\n styles:\n layout.grid.row: \"2\"\n layout.grid.column: \"1 / -1\"\n # Collapsed to raw 0 when a content section follows, to close the\n # header/content seam — unthemeable by design.\n spacing.internal.block.end: 0\n relation:\n cardinality: \"0..1\"\n slotName: header\n - node:\n uri: global.subcomponent.card-content\n styles:\n layout.grid.row: \"3\"\n layout.grid.column: \"1 / -1\"\n appearance.border.bottom.color: color.border.muted\n relation:\n cardinality: \"1\"\n slotName: default\n - node:\n uri: global.subcomponent.card-footer\n styles:\n layout.grid.row: \"4\"\n layout.grid.column: \"1 / -1\"\n appearance.border.bottom.color: color.border.muted\n relation:\n cardinality: \"0..1\"\n slotName: footer";
|
|
9
9
|
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3104-11741&t=ZeOhPBVqjN81UglM-1\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=2124-397&t=2fO23I8WsyT0YVJ1-4";
|
|
10
10
|
ds:usage "Cards are intended for use in \"collection-based\" views. They are suitable for grids and galleries where multiple data objects of the same type are displayed next to each other. \n\n### When to use\n\n- When you have a repeating data structure with a uniform set of attributes that requires high legibility across many instances.\n- When the container itself acts as a toggle or a checkbox for selecting an item from a group. (radio card) // should be linking to forms\n- When the user behavior is focused on exploration of options, rather than searching for an already identified item of the group. Cards facilitate consuming the information of an individual data object, in contrast with a table where the emphasis is on comparison and ability to scan. \n- When building a responsive table, on small viewports, the designer can choose between horizontal scroll, or converting table rows into cards. \n\n### When not to use\n\n- When a single piece of information is being highlighted on a page without any \"peers\".\n - Incorrect: A single card floating in the middle of a dashboard to show \"Total users\".\n - Remediation: Use a [Tile](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-eThhoLZg3Y) component designed for individual metric display.\n- When the user needs to perform deep data analysis or multi-column sorting on regular size pages.\n - Incorrect: Forcing 50 columns of data into a small card format.\n - Remediation: Use a [Table](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Olq5LYSopF) to allow for better horizontal scanning and sorting of specific values.";
|
|
11
|
-
ds:guidelines "
|
|
11
|
+
ds:guidelines "";
|
|
12
12
|
ds:tier ds:global;
|
|
13
13
|
ds:documentationStage ds:tag.needsfulldocumentation;
|
|
14
|
-
ds:
|
|
15
|
-
a ds:Property;
|
|
16
|
-
ds:optional "false"
|
|
17
|
-
];
|
|
14
|
+
ds:hasSubcomponent ds:global.subcomponent.card-footer, ds:global.subcomponent.card-thumbnail, ds:global.subcomponent.card-content, ds:global.subcomponent.card-image, ds:global.subcomponent.card-header;
|
|
18
15
|
ds:changeLog [
|
|
19
16
|
a ds:ChangeLogEntry;
|
|
20
17
|
ds:timestamp "2025-12-05T00:00:00.000+01:00";
|
|
@@ -32,7 +29,6 @@ ds:global.component.card a ds:Component;
|
|
|
32
29
|
ds:timestamp "2026-04-06T00:00:00.000+02:00";
|
|
33
30
|
ds:changeType "change"
|
|
34
31
|
];
|
|
35
|
-
ds:hasSubcomponent ds:global.subcomponent.card-footer, ds:global.subcomponent.card-thumbnail, ds:global.subcomponent.card-content, ds:global.subcomponent.card-image, ds:global.subcomponent.card-header;
|
|
36
32
|
ds:hasTokenBinding [
|
|
37
33
|
a ds:TokenBinding;
|
|
38
34
|
ds:viaBlock ds:global.component.card;
|
|
@@ -11,12 +11,12 @@ ds:global.component.code_snippet a ds:Component;
|
|
|
11
11
|
ds:guidelines "";
|
|
12
12
|
ds:tier ds:global;
|
|
13
13
|
ds:documentationStage ds:tag.needsdesign;
|
|
14
|
+
ds:hasSubcomponent ds:global.component.code_snippet-content, ds:global.component.code_snippet-header;
|
|
14
15
|
ds:changeLog [
|
|
15
16
|
a ds:ChangeLogEntry;
|
|
16
17
|
ds:timestamp "2026-03-21T00:00:00.000+01:00";
|
|
17
18
|
ds:changeType "change"
|
|
18
19
|
];
|
|
19
|
-
ds:hasSubcomponent ds:global.component.code_snippet-content, ds:global.component.code_snippet-header;
|
|
20
20
|
ds:hasTokenBinding [
|
|
21
21
|
a ds:TokenBinding;
|
|
22
22
|
ds:viaBlock ds:global.component.code_snippet;
|
|
@@ -6,7 +6,7 @@ ds:global.component.drag_and_drop_list a ds:Component;
|
|
|
6
6
|
ds:name "DragAndDropList";
|
|
7
7
|
ds:summary "The DragAndDropList component enables users to reorder items within a single-dimensional list through direct pointer, keyboard or touch interaction. Its primary purpose is to allow sequence manipulation via multiple different methods.";
|
|
8
8
|
ds:anatomyDsl "";
|
|
9
|
-
ds:anatomyClassic "
|
|
9
|
+
ds:anatomyClassic "";
|
|
10
10
|
ds:usage "";
|
|
11
11
|
ds:guidelines "";
|
|
12
12
|
ds:tier ds:global;
|
|
@@ -11,9 +11,9 @@ ds:global.component.dropdown_button a ds:Component;
|
|
|
11
11
|
ds:guidelines "";
|
|
12
12
|
ds:tier ds:global;
|
|
13
13
|
ds:documentationStage ds:tag.needscoredocumentation;
|
|
14
|
+
ds:inheritsFrom ds:global.component.button;
|
|
14
15
|
ds:changeLog [
|
|
15
16
|
a ds:ChangeLogEntry;
|
|
16
17
|
ds:timestamp "2026-05-01T00:00:00.000+02:00";
|
|
17
18
|
ds:changeType "decision"
|
|
18
|
-
]
|
|
19
|
-
ds:inheritsFrom ds:global.component.button.
|
|
19
|
+
].
|