Skip to content

Commit cc88634

Browse files
flxlst09kathrinschalberdanielleroux
authored
docs: button renaming and usage guide adaptions (#25)
* docs: button renaming and usage guide adaptions * Update docs/components/button/guide.md Co-authored-by: Kathrin <123640803+kathrinschalber@users.noreply.github.com> * Update docs/components/button/guide.md Co-authored-by: Kathrin <123640803+kathrinschalber@users.noreply.github.com> * docs: updating button usage guide after review * docs: updated option description * docs: Update button guide --------- Co-authored-by: Kathrin <123640803+kathrinschalber@users.noreply.github.com> Co-authored-by: Daniel Leroux <daniel.leroux@siemens.com>
1 parent 4a5f55d commit cc88634

15 files changed

+73
-102
lines changed

docs/components/button/code.mdx

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,36 @@ import ButtonLoadingPlayground from '@site/docs/autogenerated/playground/button-
2020

2121
# Button - Code
2222

23-
## Primary
23+
## Default
2424

25-
<ButtonsPlayground />
26-
27-
## Primary Outline
25+
Use for primary actions
2826

29-
:::info
27+
<ButtonsPlayground />
3028

31-
Will be used as **Secondary** in UX context
29+
## Default outline
3230

33-
:::
31+
Use for secondary actions
3432

3533
<ButtonSecondaryPlayground />
3634

37-
## Primary Ghost
35+
## Default ghost
3836

39-
:::info
40-
41-
Will be used as **Ghost** in UX context
42-
43-
:::
37+
Use for tertiary actions
4438

4539
<ButtonGhostPlayground />
4640

47-
## Secondary
48-
49-
:::info
41+
## Subtle
5042

51-
Will be used as **Grey button** in UX context
43+
Use for low emphasis
5244

53-
:::
5445

5546
<ButtonGreyPlayground />
5647

57-
## Secondary Outline
58-
59-
:::info
60-
61-
Will be used as **Grey secondary** in UX context
62-
63-
:::
48+
## Subtle outline
6449

6550
<ButtonGreySecondaryPlayground />
6651

67-
## Secondary Ghost
68-
69-
:::info
70-
71-
Will be used as **Grey ghost** in UX context
72-
73-
:::
52+
## Subtle ghost
7453

7554
<ButtonGreyGhostPlayground />
7655

@@ -80,13 +59,13 @@ Will be used as **Grey ghost** in UX context
8059

8160
<ButtonDangerPlayground />
8261

83-
## Danger Outline
62+
## Danger outline
8463

8564
<SinceTag message="2.3.0" />
8665

8766
<ButtonDangerOutlinePlayground />
8867

89-
## Danger Ghost
68+
## Danger ghost
9069

9170
<SinceTag message="2.3.0" />
9271

docs/components/button/guide.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,54 @@ doc-type: 'tab-item'
55

66
Buttons initiate actions, apply actions to selected objects and activate/deactivate functions. We typically use buttons to trigger an immediate action, and you can place them within dialogs, forms, modal windows and other containers.
77

8-
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1097-5037&mode=design&t=KAxDgJoFX436Uk0b-11)
8+
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5771-4670&t=yk9Vv3HSXaEzBbQk-4)
99

10-
1. Button label
11-
2. Button icon
10+
1. Label
11+
2. Icon
1212

1313
## Variants
1414

15-
- **Primary button:** In our applications, we most often use the primary button variant.
16-
- **Secondary button:** The secondary button variant has a grayscale appearance to distinguish it from the primary button.
17-
- **Danger button:** We use the danger button variant to emphasize particularly dangerous, destructive or critical actions that cannot easily be undone. Consider this especially in confirmation dialogs.
15+
![Button variants](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5771-6179&t=yk9Vv3HSXaEzBbQk-4)
1816

19-
**Note:** Please be aware that the terms _primary_ and _secondary_ are not used in accordance to common UX terminology for primary, secondary and ghost button.
17+
- **Subtle:** Use as an alternative to the default button when a less prominent visual emphasis is desired. Previously labeled as "secondary" in earlier versions of the design system, the term "subtle" more accurately reflects its intended purpose and visual hierarchy.
18+
- **Danger:** Use for destructive or critical actions like "delete" or "remove". We typically use the danger button for actions that are irreversible or have a significant impact on the user’s data or the application state.
2019

2120
## Options
2221

23-
- **Default:** Use for the most important or most-likely next action within the user interface. These are typically actions that advance the user through a process, such as "Submit", "Save" or "Add". We use these sparingly and recommend only one per layout. These are typically called _primary_ buttons in UX.
24-
- **Outline:** Use for standard actions that need to be easily recognizable or for actions supporting the default (primary) action. These could include actions like "Cancel", "Reset" or "Advanced Options". These are typically called _secondary_ buttons in UX.
25-
- **Ghost:** Use for actions that are typically not part of the core user journey but serve specialized or conditional purposes. Tertiary buttons can represent actions such as "Advanced settings", "More options", "Help" or "Customize". They may also be used for conditional actions like "Change preferences" or "View details".
26-
- **Icon:** Icons can also be displayed with button labels.
27-
- **Disabled:** Buttons can be disabled (see also button states).
28-
- **Loading:** A loading spinner is displayed on the button. The spinner replaces an icon when available.
29-
- **Type:** A submit button is available. Submit buttons are typically used in forms and trigger a submit event. Apply this type to make a submit button more accessible.
22+
- **Default:** Use default buttons with filled style for primary actions.
23+
- **Outline:** Use outline buttons for secondary actions supporting the primary action, e.g. "Cancel" or "Reset".
24+
- **Ghost:** Use ghost buttons for tertiary actions that serve specialized or conditional purposes, e.g. "Advanced settings", "More options", "Help" or "Customize", "Change preferences" or "View details".
25+
- **Label:** The label is the text displayed on the button. We typically use short, descriptive labels that clearly communicate the action the button triggers.
26+
- **Icon:** An icon can be displayed on the button. We typically use icons to support the label and make the button more easy to discover by the user. The icon should be widely known for representing the action or function among your users. See [icon button](../icon-button/index.mdx) for buttons without label and icon only.
27+
- **Type:** Use the type "submit" when sending user input from a form to a server. For all other actions such as triggering dialogs or performing navigation use the default type "button".
3028

3129
## Behavior in context
3230

3331
- **Interaction:** Buttons can be triggered by pressing anywhere within the button container. When buttons are focused, they can be triggered by pressing `Space`.
34-
- **Text truncation:** Button labels are not truncated. All text on buttons is one line only.
35-
- **Ellipsis (…):** Ellipsis can be used to indicate that an action requires further input or choice from the user, such as "Save as…" which opens a further list of file types to choose from. Ellipses is typically not used for actions with a subsequent confirmation dialog.
36-
- **Alignment:** Buttons can be left-justified or right-justified or fully span a container’s width.
37-
- **Cluster buttons:** Buttons can be clustered in groups based on their relationship. A cluster can contain a mixture of buttons, e.g. a combination of a primary button with two primary ghost buttons. We recommend a minimum distance of `0.5rem` between adjacent buttons, and we typically cluster buttons if actions/functions are related but not excluding each other. Otherwise, consider using a `button group`.
38-
- **Button width:** Button width depends on its content. In addition, buttons have a default minimum width of 5rem to lay out common combinations such as "OK" and "Cancel" more harmoniously with equal widths. The minimum width is customizable to accommodate other combinations.
32+
- **Text truncation:** Button labels are not truncated. All text on buttons is one line only.
33+
- **Alignment:** Buttons can be left- or right-aligned or fully span a container’s width.
34+
- **Button width:** Buttons dynamically adjust their width based on content but have a default minimum width of `5rem` to ensure harmonious alignment for common pairs like "OK" and "Cancel". The minimum width can be customized for different needs.
35+
- **Cluster buttons:** Cluster buttons in groups with related functions. A cluster might include various types of buttons, e.g. default, outline and ghost to show primary, secondary and tertiary actions. We recommend a gap of `0.5rem` between buttons.
36+
37+
![Cluster buttons](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5773-6487&t=yk9Vv3HSXaEzBbQk-4)
3938

4039
## States
4140

42-
Buttons have six states: Default, hover, active, disabled, loading and focused. In a disabled state, buttons are visually displayed but don’t offer any user interaction.
41+
Buttons have six states: Default, hover, active, disabled, loading and focused. In a disabled and loading state, buttons are visually displayed but don’t offer any user interaction.
4342

44-
![Button states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=132-13020&mode=design&t=KAxDgJoFX436Uk0b-11)
43+
![Button states](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5878-6015&t=yk9Vv3HSXaEzBbQk-4)
4544

4645
## Dos and Don’ts
4746

48-
- Do use short button labels to allow users to quickly scan, understand and remember them (follow our writing style guide for more support)
49-
- Do use only one primary (default) button in one visual unit for a clear and singular focus on the main call to action
50-
- Do use the danger button for destructive or critical actions like "delete" or "remove", especially in confirmation dialogs
51-
- Do use a default margin between adjacent buttons of at least `0.5rem`
52-
- Do adjust default and outline button width to label length or container width
47+
- Do use short button labels to allow users to quickly scan, understand and remember them (see our [writing style guide](../../guidelines/language/dialogs-and-buttons.md))
48+
- Do use ellipsis (…) to indicate that an action requires further input or choice from the user, e.g. "Save as…" which opens a list of file types to choose from.
49+
- Do use the default option for buttons to indicate one primary action in a visual unit, all other secondary actions should use the outline option.
5350
- Don’t use the danger button excessively or repetitively in lists or tables
54-
- Don’t extend your ghost button width beyond the label’s available width
55-
- Don’t rely on standard buttons when many actions/functions are necessary (use dropdown, split or menu buttons or move some functionality to a panel or a dialog)
56-
- Don’t use buttons for navigation
51+
- Don’t rely on standard buttons when many actions are necessary (use [dropdown buttons](../dropdown-button/index.mdx) or [split buttons](../split-button/index.mdx) instead, or move some functionality to a [pane](../panes/index.mdx) or a [dialog](../modal/index.mdx))
5752

5853
## Related
5954

60-
- [Dropdown button](../dropdown-button)
61-
- [Split button](../split-button)
62-
- [Toggle button](../toggle-button)
63-
- [Modal](../modal)
55+
- [Dropdown button](../dropdown-button/index.mdx)
56+
- [Split button](../split-button/index.mdx)
57+
- [Toggle button](../toggle-button/index.mdx)
58+
- [Modal](../modal/index.mdx)

docs/components/dropdown-button/guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ doc-type: 'tab-item'
55

66
Dropdown buttons are button elements that allow users to select an action from a list of options by clicking on a button and revealing a dropdown. Clicking on one of the exposed options triggers the action. We typically use dropdown buttons when no default action is available. Dropdown buttons typically group similar or related actions.
77

8-
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1477-13932&mode=design&t=97WS5dUS2rk3MCp2-11)
8+
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5887-7624&t=yk9Vv3HSXaEzBbQk-4)
99

10-
1. Button container
11-
2. Button label
10+
1. Container
11+
2. Label
1212
3. Chevron
13-
4. Button icon
13+
4. Icon
1414

15-
All the variants, options and states of the ix button component apply to the dropdown button. We've listed additional or deviating specifications here.
15+
All the variants, options and states of the [button](../button/index.mdx) component apply to the dropdown button. We've listed additional or deviating specifications here.
1616

1717
## Options
1818

1919
- **Label:** Set a label for the dropdown button. We typically use short labels including verbs.
2020
- **Placement:** Define where the dropdown appears when the button is active. Choose between different directions (top, bottom, left, right) and two options for alignment with the button (start, end). When there isn't enough space for the chosen placement, it's automatically corrected.
2121

22-
![Placement example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1504-2203&mode=design&t=5MYmq6zAbfw7xIkC-11)
22+
![Placement example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5887-7647&t=yk9Vv3HSXaEzBbQk-4)
2323

2424
1. Bottom-end placement
2525
2. Bottom-start placement
2626

27-
- For options of the dropdown triggered when pressing the button, please refer to our separate dropdown component guide.
28-
- The options **loading** and **type** are not available for split buttons.
27+
- For options of the dropdown triggered when pressing the button, please refer to our separate [dropdown](../dropdown/index.mdx) component guide.
28+
- The options **loading** and **type** are not available for dropdown buttons.
2929

3030
## States
3131

32-
Dropdown buttons have five states: Default, hover, active, disabled and focused. In an active state, dropdown buttons show a dropdown with the available options. The visual appearance of the states is the same as the ix button component.
32+
Dropdown buttons have five states: Default, hover, active, disabled and focused. In an active state, dropdown buttons show a dropdown with the available options. The visual appearance of the states is the same as the [button](../button/index.mdx) component.
3333

3434
## Dos and Don’ts
3535

docs/components/icon-button/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ doc-type: 'tab-item'
55

66
Icon buttons are button elements containing only an icon and no text. Due to their small size, icon buttons are often used in complex layouts. We only use icon buttons if a well-known icon is available or the meaning of the icon metaphor is clear from the context.
77

8-
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1477-1714&mode=design&t=97WS5dUS2rk3MCp2-1)
8+
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5888-7882&t=yk9Vv3HSXaEzBbQk-4)
99

1010
1. Container
1111
2. Icon

docs/components/split-button/guide.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,22 @@ doc-type: 'tab-item'
55

66
Split buttons consist of two parts: a button labeled with text and/or an icon on the left and a dropdown button labeled with an icon on the right. We typically use split buttons when a default action is available but more options need to be offered. Split buttons group similar or related actions.
77

8-
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1480-30799&mode=design&t=97WS5dUS2rk3MCp2-11)
8+
![Overview](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Documentation-illustrations?node-id=5888-8071&t=yk9Vv3HSXaEzBbQk-4)
99

1010
1. Button
1111
2. Dropdown button
1212
3. Button icon
1313
4. Button label
1414
5. Dropdown button icon
1515

16-
All the variants, options and states of the ix button and the ix dropdown button components apply to the split button. We've listed additional or deviating specifications here.
16+
All the variants, options and states of the [button](../button/index.mdx) and the [dropdown button](../dropdown-button/index.mdx) components apply to the split button. We've listed additional or deviating specifications here.
1717

1818
## Options
1919

2020
- **Disabled:** The disabled option can be applied to the complete component. There is no option to disable each part of the split button independently.
2121
- **Label:** Set a label for the button component (left side). We typically use short labels that contain a verb.
2222
- **Placement:** Define where the flyout appears which is triggered when the dropdown button is active. You can choose between different directions (top, bottom, left, right) and two options for alignment with the button (start, end). When there is not enough space for the chosen setting, the placement is corrected automatically.
23-
24-
![Placement example](https://www.figma.com/design/wEptRgAezDU1z80Cn3eZ0o/iX-Pattern-Illustrations?type=design&node-id=1504-2203&mode=design&t=5MYmq6zAbfw7xIkC-11)
25-
26-
1. Bottom-end placement
27-
2. Bottom-start placement
28-
29-
- **SplitIcon:** We typically use a chevron icon on the dropdown button, but a custom icon can be set. A common alternative to the chevron is the "more-menu" icon.
23+
- **Split icon:** We typically use a chevron icon on the dropdown button, but a custom icon can be set. A common alternative to the chevron is the "more-menu" icon.
3024
- The options **loading** and **type** are not available for split buttons.
3125

3226
## Behavior in context

docs/components/toggle-button/code.mdx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,49 +23,52 @@ import IconToggleButtonPrimaryGhostPlayground from '@site/docs/autogenerated/pla
2323

2424
# Toggle button - Code
2525

26-
## Toggle button primary
26+
## Default
2727

2828
<ToggleButtonPrimaryPlayground />
2929

30-
## Toggle button primary outline
30+
### Default outline
3131

3232
<ToggleButtonPrimaryOutlinePlayground />
3333

34-
## Toggle button primary ghost
34+
### Default ghost
3535

3636
<ToggleButtonPrimaryGhostPlayground />
3737

38-
## Toggle button secondary
38+
## Subtle
3939

4040
<ToggleButtonSecondaryPlayground />
4141

42-
## Toggle button secondary outline
42+
### Subtle outline
4343

4444
<ToggleButtonSecondaryOutlinePlayground />
4545

46-
## Toggle button secondary ghost
46+
### Subtle ghost
4747

4848
<ToggleButtonSecondaryGhostPlayground />
4949

50-
## Icon Toggle button secondary outline
50+
## Icon default
5151

52-
<IconToggleButtonSecondaryOutlinePlayground />
52+
### Icon default outline
5353

54-
## Icon Toggle button secondary ghost
54+
<IconToggleButtonPrimaryOutlinePlayground />
5555

56-
<IconToggleButtonSecondaryGhostPlayground />
56+
### Icon default ghost
5757

58-
## Icon Toggle Button secondary
58+
<IconToggleButtonPrimaryGhostPlayground />
59+
60+
## Icon subtle
5961

6062
<IconToggleButtonSecondaryPlayground />
6163

62-
## Icon Toggle button primary outline
64+
### Icon subtle outline
6365

64-
<IconToggleButtonPrimaryOutlinePlayground />
66+
<IconToggleButtonSecondaryOutlinePlayground />
6567

66-
## Icon Toggle Button primary ghost
68+
### Icon subtle ghost
6769

68-
<IconToggleButtonPrimaryGhostPlayground />
70+
<IconToggleButtonSecondaryGhostPlayground />
6971

70-
<PropsIconToggleButtonApi />
7172
<PropsToggleButtonApi />
73+
<PropsIconToggleButtonApi />
74+
7.24 KB
Loading
12.1 KB
Loading
23.7 KB
Loading
45.8 KB
Loading

0 commit comments

Comments
 (0)