@sebgroup/green-core 3.23.0 → 3.24.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/assets/icons/regular/satellite.svg +6 -0
- package/assets/icons/solid/satellite.svg +5 -0
- package/components/button/button.component.js +6 -1
- package/components/calendar/calendar.component.js +2 -1
- package/components/context-menu/context-menu.component.js +3 -0
- package/components/datepicker/datepicker.component.js +57 -13
- package/components/icon/icons/index.d.ts +1 -0
- package/components/icon/icons/index.js +1 -0
- package/components/icon/icons/pure.d.ts +1 -0
- package/components/icon/icons/pure.js +1 -0
- package/components/icon/icons/satellite.component.d.ts +18 -0
- package/components/icon/icons/satellite.component.js +25 -0
- package/components/icon/icons/satellite.d.ts +2 -0
- package/components/icon/icons/satellite.js +6 -0
- package/components/link/link.styles.js +23 -3
- package/components/popover/popover.component.js +3 -2
- package/components/table/table.stories.data.js +186 -182
- package/custom-elements.json +27017 -26394
- package/gds-element.js +1 -1
- package/generated/mcp/alert/index.json +0 -1
- package/generated/mcp/avatar/index.json +0 -1
- package/generated/mcp/badge/index.json +0 -1
- package/generated/mcp/blur/index.json +0 -1
- package/generated/mcp/breadcrumbs/index.json +0 -1
- package/generated/mcp/button/index.json +0 -1
- package/generated/mcp/calendar/index.json +0 -1
- package/generated/mcp/card/index.json +0 -1
- package/generated/mcp/card-pattern-01/index.json +0 -1
- package/generated/mcp/checkbox/index.json +0 -1
- package/generated/mcp/coachmark/index.json +0 -1
- package/generated/mcp/components.json +1 -44
- package/generated/mcp/context-menu/index.json +0 -1
- package/generated/mcp/datepicker/index.json +0 -1
- package/generated/mcp/details/index.json +0 -1
- package/generated/mcp/dialog/index.json +0 -1
- package/generated/mcp/div/index.json +0 -1
- package/generated/mcp/divider/index.json +0 -1
- package/generated/mcp/dropdown/index.json +0 -1
- package/generated/mcp/fab/index.json +0 -1
- package/generated/mcp/filter-chips/index.json +0 -1
- package/generated/mcp/flex/index.json +0 -1
- package/generated/mcp/form-summary/index.json +0 -1
- package/generated/mcp/grid/index.json +0 -1
- package/generated/mcp/icon-satellite/angular.md +15 -0
- package/generated/mcp/icon-satellite/api.md +31 -0
- package/generated/mcp/icon-satellite/index.json +8 -0
- package/generated/mcp/icon-satellite/react.md +15 -0
- package/generated/mcp/icons.json +13 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/input/index.json +0 -1
- package/generated/mcp/link/index.json +0 -1
- package/generated/mcp/list/index.json +0 -1
- package/generated/mcp/list-item-pattern-01/index.json +0 -1
- package/generated/mcp/menu-button/index.json +0 -1
- package/generated/mcp/pagination/index.json +0 -1
- package/generated/mcp/popover/index.json +0 -1
- package/generated/mcp/radio/index.json +0 -1
- package/generated/mcp/rich-text/index.json +0 -1
- package/generated/mcp/segmented-control/index.json +0 -1
- package/generated/mcp/select/index.json +0 -1
- package/generated/mcp/signal/index.json +0 -1
- package/generated/mcp/spinner/index.json +0 -1
- package/generated/mcp/switch/index.json +0 -1
- package/generated/mcp/table/index.json +0 -1
- package/generated/mcp/tabs/index.json +0 -1
- package/generated/mcp/text/index.json +0 -1
- package/generated/mcp/textarea/index.json +0 -1
- package/generated/mcp/theme/index.json +0 -1
- package/generated/mcp/tokens.json +1 -1
- package/generated/mcp/video/index.json +0 -1
- package/generated/react/icons/icon-satellite/index.d.ts +691 -0
- package/generated/react/icons/icon-satellite/index.js +14 -0
- package/generated/react/index.d.ts +2 -1
- package/generated/react/index.js +2 -1
- package/package.json +2 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/helpers/has-changed.d.ts +8 -0
- package/utils/helpers/has-changed.js +10 -0
- package/generated/mcp/alert/guidelines.md +0 -105
- package/generated/mcp/avatar/guidelines.md +0 -40
- package/generated/mcp/badge/guidelines.md +0 -56
- package/generated/mcp/blur/guidelines.md +0 -3
- package/generated/mcp/breadcrumbs/guidelines.md +0 -35
- package/generated/mcp/button/guidelines.md +0 -83
- package/generated/mcp/calendar/guidelines.md +0 -3
- package/generated/mcp/card/guidelines.md +0 -78
- package/generated/mcp/card-pattern-01/guidelines.md +0 -52
- package/generated/mcp/checkbox/guidelines.md +0 -91
- package/generated/mcp/coachmark/guidelines.md +0 -8
- package/generated/mcp/context-menu/guidelines.md +0 -33
- package/generated/mcp/datepicker/guidelines.md +0 -44
- package/generated/mcp/details/guidelines.md +0 -24
- package/generated/mcp/dialog/guidelines.md +0 -35
- package/generated/mcp/div/guidelines.md +0 -3
- package/generated/mcp/divider/guidelines.md +0 -24
- package/generated/mcp/dropdown/guidelines.md +0 -96
- package/generated/mcp/fab/guidelines.md +0 -27
- package/generated/mcp/filter-chips/guidelines.md +0 -47
- package/generated/mcp/flex/guidelines.md +0 -1
- package/generated/mcp/form-summary/guidelines.md +0 -39
- package/generated/mcp/grid/guidelines.md +0 -3
- package/generated/mcp/input/guidelines.md +0 -127
- package/generated/mcp/link/guidelines.md +0 -43
- package/generated/mcp/list/guidelines.md +0 -16
- package/generated/mcp/list-item-pattern-01/guidelines.md +0 -49
- package/generated/mcp/menu-button/guidelines.md +0 -39
- package/generated/mcp/pagination/guidelines.md +0 -24
- package/generated/mcp/popover/guidelines.md +0 -3
- package/generated/mcp/radio/guidelines.md +0 -74
- package/generated/mcp/rich-text/guidelines.md +0 -3
- package/generated/mcp/segmented-control/guidelines.md +0 -31
- package/generated/mcp/select/guidelines.md +0 -29
- package/generated/mcp/signal/guidelines.md +0 -14
- package/generated/mcp/spinner/guidelines.md +0 -6
- package/generated/mcp/switch/guidelines.md +0 -41
- package/generated/mcp/table/guidelines.md +0 -169
- package/generated/mcp/tabs/guidelines.md +0 -64
- package/generated/mcp/text/guidelines.md +0 -3
- package/generated/mcp/textarea/guidelines.md +0 -73
- package/generated/mcp/theme/guidelines.md +0 -3
- package/generated/mcp/video/guidelines.md +0 -3
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Context menu
|
|
2
|
-
|
|
3
|
-
A context menu displays a list of contextual actions.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Custom trigger button
|
|
9
|
-
|
|
10
|
-
The context menu trigger button can have an icon or custom text slotted.
|
|
11
|
-
|
|
12
|
-
### Menu item
|
|
13
|
-
|
|
14
|
-
In a menu item you can slot in text and icons along other layout components.
|
|
15
|
-
|
|
16
|
-
### Label
|
|
17
|
-
|
|
18
|
-
It can be visually displayed, or hidden but still available to screen readers.
|
|
19
|
-
|
|
20
|
-
### Guidelines
|
|
21
|
-
|
|
22
|
-
Use the context menu to give users all the options when you can’t fit them in the regular view, or to avoid cluttering the interface.
|
|
23
|
-
|
|
24
|
-
### Destructive items
|
|
25
|
-
|
|
26
|
-
Some items in the menu may be destructive. Typical example is Delete. These items behave like the delete-button and should be displayed in red.
|
|
27
|
-
|
|
28
|
-
### Do's and don'ts
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## UX Guidelines
|
|
32
|
-
|
|
33
|
-
### Writing UX text for context menus
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Datepicker
|
|
2
|
-
|
|
3
|
-
The datepicker allows users to select a date.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
- Configurable date format display
|
|
11
|
-
- `plain` mode to hide labels and error messages
|
|
12
|
-
- Clearable for quick state reset
|
|
13
|
-
- Min and max dates
|
|
14
|
-
- Can be configured with visible or hidden week numbers
|
|
15
|
-
- Individual dates can be marked as disabled in the calendar
|
|
16
|
-
- Buttons in the calendar footer are configurable
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Usage
|
|
21
|
-
|
|
22
|
-
Use datepicker when a complete date should be entered.
|
|
23
|
-
|
|
24
|
-
### Size
|
|
25
|
-
|
|
26
|
-
The datepicker comes in two sizes.
|
|
27
|
-
|
|
28
|
-
- **Large** (default)
|
|
29
|
-
- **Small**: used in tables and in some special cases where the space is very limited.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Read only
|
|
34
|
-
|
|
35
|
-
Displays the entered value together with its label. Have no visual cues associated with text entry, such as an active input cursor or editable states.
|
|
36
|
-
|
|
37
|
-
[Read more about the read only pattern](http://seb.io/patterns/read-only)
|
|
38
|
-
|
|
39
|
-
### Do's and don'ts
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## UX Guidelines
|
|
43
|
-
|
|
44
|
-
### Writing UX text for date pickers
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Details
|
|
2
|
-
|
|
3
|
-
The details component is a collapsible section that helps organize and hide content until needed.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Usage
|
|
9
|
-
|
|
10
|
-
Details provide similar semantics and functionality as the native `<details>` html element, including the ability to connect several details together to form an accordion.
|
|
11
|
-
|
|
12
|
-
Accordions or single details components are commonly used to manage dense information in interfaces like FAQs, settings panels, or forms. Saving space, reducing cognitive overload, and improving scannability while maintaining a clean, organized layout.
|
|
13
|
-
|
|
14
|
-
Use it when presenting large amounts of secondary or optional information that users don’t need to see all at once.
|
|
15
|
-
|
|
16
|
-
### Size
|
|
17
|
-
|
|
18
|
-
The details component comes in two sizes:
|
|
19
|
-
|
|
20
|
-
* **Large** (default)
|
|
21
|
-
|
|
22
|
-
* **Small**
|
|
23
|
-
|
|
24
|
-
### Do's and don'ts
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Dialog
|
|
2
|
-
|
|
3
|
-
A dialog appears in front of content to provide critical information or ask for a decision.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
Dialogs are modal, meaning they block interaction with the rest of the application or interface until the user addresses the dialog (e.g., by clicking a button, entering input, or closing it). This ensures the user focuses on the dialog's content before returning to the main workflow, and also ensures that keyboard and screen reader focus is kept within the dialog.
|
|
11
|
-
|
|
12
|
-
By default, the dialog will close when the user clicks the backdrop, but this behavior can be opted out from if the dialog needs to stay open until a flow is completed, for example.
|
|
13
|
-
|
|
14
|
-
### Variants
|
|
15
|
-
|
|
16
|
-
The dialog can be shown either as a regular dialog window or as a slide-out.
|
|
17
|
-
|
|
18
|
-
#### Regular
|
|
19
|
-
|
|
20
|
-
The regular window is positioned in the center of the screen.
|
|
21
|
-
|
|
22
|
-
#### Slide-out
|
|
23
|
-
|
|
24
|
-
The slide-out is positioned on the right-hand side and always takes up the full height of the viewport (minus padding). Width can be customized to suite various needs.
|
|
25
|
-
|
|
26
|
-
### Usage
|
|
27
|
-
|
|
28
|
-
Dialogs are powerful tools for focusing user attention, but their use should be deliberate to avoid disrupting the user experience.
|
|
29
|
-
|
|
30
|
-
### Do's and don'ts
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## UX Guidelines
|
|
34
|
-
|
|
35
|
-
### Writing UX text for dialogs
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Divider
|
|
2
|
-
|
|
3
|
-
Divider creates visual and semantic separation between content.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
#### Colors
|
|
11
|
-
|
|
12
|
-
The color of the divider line can be set to a color token.
|
|
13
|
-
|
|
14
|
-
#### Spacing
|
|
15
|
-
|
|
16
|
-
Spacing around the divider can be controlled using the `size` attribute.
|
|
17
|
-
|
|
18
|
-
### Usage
|
|
19
|
-
|
|
20
|
-
Use dividers to support visual hierarchy when headings or spacing alone aren’t sufficient, such as between groups of menu items.
|
|
21
|
-
|
|
22
|
-
By default dividers have a semantic meaning in the browser but it can be marked as presentational using `role="presentation"` .
|
|
23
|
-
|
|
24
|
-
### Do's and don'ts
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Dropdown
|
|
2
|
-
|
|
3
|
-
A dropdown enables the user to choose one or multiple options from a list.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Sizes
|
|
9
|
-
|
|
10
|
-
- **Large**
|
|
11
|
-
- **Small**: Used in tables and in certain cases where space is very limited. (Custom layouts are not supported.)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Features
|
|
16
|
-
|
|
17
|
-
#### Label
|
|
18
|
-
|
|
19
|
-
All dropdown fields must have a label to ensure clarity and accessibility. Labels help users understand the purpose of the field, including those using assistive technologies.
|
|
20
|
-
|
|
21
|
-
#### Optional field indicator
|
|
22
|
-
|
|
23
|
-
We only ask for required information. If some fields are optional, we let users know by adding "(optional)" in brackets next to the field label. The word "(optional)" is shown in regular font weight to distinguish it from the label.
|
|
24
|
-
|
|
25
|
-
#### Support text
|
|
26
|
-
|
|
27
|
-
Use this to explain how to fill in the field, for example how to count or what to include.
|
|
28
|
-
|
|
29
|
-
### Contextual help
|
|
30
|
-
|
|
31
|
-
If the label and support text aren’t enough to explain a field, we can use the info icon. Clicking the icon shows additional support text between the label support and the field.
|
|
32
|
-
|
|
33
|
-
- Use a tooltip if space is limited.
|
|
34
|
-
- Use a modal for large amounts of text.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
#### Leading icon
|
|
39
|
-
|
|
40
|
-
A leading icon visually reinforces the purpose of the field, helping users to understand what type of information is needed.
|
|
41
|
-
|
|
42
|
-
### Single select
|
|
43
|
-
|
|
44
|
-
Use this version when users should select only one option from the list.
|
|
45
|
-
|
|
46
|
-
### Multi select
|
|
47
|
-
|
|
48
|
-
Use this version when users should be able to select one or multiple options from the list.
|
|
49
|
-
|
|
50
|
-
### Search
|
|
51
|
-
|
|
52
|
-
A search field can be used to filter the options.
|
|
53
|
-
|
|
54
|
-
- If the list is long (e.g., 10+ items), searching helps users find what they need faster.
|
|
55
|
-
- When items are similar or not in a predictable order, searching improves efficiency.
|
|
56
|
-
- If users have a specific item in mind, typing is often faster than scrolling.
|
|
57
|
-
- Search helps users who navigate with keyboards or screen readers find options more quickly.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Option groups
|
|
62
|
-
|
|
63
|
-
If the options can be grouped, this helps users find choices in large lists. The group can include a badge showing the number of options it contains.
|
|
64
|
-
|
|
65
|
-
### Custom option layout
|
|
66
|
-
|
|
67
|
-
The text slot for each dropdown and option supports a custom layout with multiple values, typically used for account selection. These layouts can be customised for specific use cases. Note that these fields are taller than a regular dropdown.
|
|
68
|
-
|
|
69
|
-
#### Combo box
|
|
70
|
-
|
|
71
|
-
This field allows users to type directly into it, like a standard input field. As they type, a list of matching options appears. If they enter an option that isn’t in the list, it is still accepted as a valid choice.
|
|
72
|
-
|
|
73
|
-
#### Clearable
|
|
74
|
-
|
|
75
|
-
To make it easy for users to clear a field, an x-icon button can be placed at the end of the field. This is commonly used in search/filter forms.
|
|
76
|
-
|
|
77
|
-
#### Error message
|
|
78
|
-
|
|
79
|
-
Used to indicate that a selection must be made from the dropdown or that there is an error with the selected option.
|
|
80
|
-
|
|
81
|
-
### Read only
|
|
82
|
-
|
|
83
|
-
The read only displays the selected value, but removes affordances that suggest the list can be opened or changed.
|
|
84
|
-
|
|
85
|
-
[Read more about the read only pattern](https://seb.io/patterns/read-only)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## UX Guidelines
|
|
89
|
-
|
|
90
|
-
### Writing UX text for drop-downs
|
|
91
|
-
|
|
92
|
-
### Use clear and informative words
|
|
93
|
-
|
|
94
|
-
### Placeholder text
|
|
95
|
-
|
|
96
|
-
### Capitalisation rules
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# FAB
|
|
2
|
-
|
|
3
|
-
Floating action button persists across screens for constant access to features that needs to be accessible at all times.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Usage
|
|
9
|
-
|
|
10
|
-
The FAB is a high-visibility button used to promote a **key action** on a screen. It typically floats above the content, anchored to a corner (usually bottom-right or bottom-center on mobile).
|
|
11
|
-
|
|
12
|
-
Use the FAB when a single, standout action is needed such as "Add", "Create", or "Start". It should never compete with other primary actions and should be used **sparingly** to avoid visual clutter.
|
|
13
|
-
|
|
14
|
-
### Variants
|
|
15
|
-
|
|
16
|
-
The FAB can be adapted based on layout and context:
|
|
17
|
-
|
|
18
|
-
* **FAB** – A circular button with an icon (e.g. a plus sign for “Add”)
|
|
19
|
-
|
|
20
|
-
* **Extended FAB** – A wider button with both an icon and a label (e.g. “Add item”). Useful when more clarity is needed.
|
|
21
|
-
|
|
22
|
-
### Do’s and don’ts
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## UX Guidelines
|
|
26
|
-
|
|
27
|
-
### Writing UX text for FAB's
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Filter chips
|
|
2
|
-
|
|
3
|
-
Filter chips allow users to narrow down the data they want to see on the page.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### States
|
|
9
|
-
|
|
10
|
-
The filter chip component comes in two states, "enabled" - can be selected and "selected" - can be unselected.
|
|
11
|
-
|
|
12
|
-
- **Enabled** – The default state, displaying only a label. Use this variant when presenting available filter options.
|
|
13
|
-
- **Selected** – When selected, the chips updates to show a checkmark icon alongside the label, indicating an active filter. The selected filter can be unselected.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Example
|
|
18
|
-
|
|
19
|
-
If a user has accounts in three countries, only those three countries should be shown as filter chips. If they have accounts in just one country, there's no need to show a country filter at all.
|
|
20
|
-
|
|
21
|
-
To improve clarity and support informed decisions, display the number of results each selected filter will return. This gives users immediate feedback on how their choices are narrowing or broadening the data set.
|
|
22
|
-
|
|
23
|
-
### Sizes
|
|
24
|
-
|
|
25
|
-
The filter chips comes in two sizes:
|
|
26
|
-
|
|
27
|
-
- **Large** (default)
|
|
28
|
-
- **Small**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Removable filter chips
|
|
33
|
-
|
|
34
|
-
If the purpose is to display an already applied filter that can be removed, use a **Button** with a trailing remove icon. This pattern clearly communicates that the filter is active and that the available action is to remove it, rather than change its selection state.
|
|
35
|
-
|
|
36
|
-
### Do's and don'ts
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## UX Guidelines
|
|
40
|
-
|
|
41
|
-
### Writing UX text for filter chips
|
|
42
|
-
|
|
43
|
-
### Avoid the & sign
|
|
44
|
-
|
|
45
|
-
### Do not mix word classes
|
|
46
|
-
|
|
47
|
-
### Do's and don'ts
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Flex
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Form summary
|
|
2
|
-
|
|
3
|
-
Form summary shows all form errors in one place.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
Form summary works automatically when placed in a form with form controls from Green Core. It has two update modes, `default` and `reactive`. In the default mode, a `refresh()` method needs to be called for the component to update and reflect the current state of the form. In the `reactive` mode, it will update on the fly as soon as the status of a control in the form changes. The `reactive` mode requires less setup to use, but the `default` mode allows for more control over the behavior.
|
|
11
|
-
|
|
12
|
-
#### Fieldset labels
|
|
13
|
-
|
|
14
|
-
To reflect the structure of the form, the summary content can be grouped using fieldset labels. These act as headings for related fields and help users quickly understand how the information is organized. By mirroring the same grouping as in the form, it becomes easier to recognize and review the content, improving both clarity and confidence before submission.
|
|
15
|
-
|
|
16
|
-
### Accessibility
|
|
17
|
-
|
|
18
|
-
Semantically, the form summary is represented as a navigation region containing an unordered list of links.
|
|
19
|
-
|
|
20
|
-
### Compatibility
|
|
21
|
-
|
|
22
|
-
Form summary is mainly intended for use with form controls from Green Core, but it also works with generic native form controls by using data-attributes.
|
|
23
|
-
|
|
24
|
-
### Usage
|
|
25
|
-
|
|
26
|
-
For long forms which are dynamically submitted (meaning the page does not reload), place the form summary at the bottom of the form, close to the submit button, so that it appears in view for the user without scrolling.
|
|
27
|
-
|
|
28
|
-
For long forms which are server-side driven (page reloads when submitting), place the form summary at the top so that it will be the first thing the user sees when the page reloads.
|
|
29
|
-
|
|
30
|
-
Short forms, where all controls are easily in view without scrolling, form summary is generally not necessary, since all the errors are already in view.
|
|
31
|
-
|
|
32
|
-
### Do's and don'ts
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## UX Guidelines
|
|
36
|
-
|
|
37
|
-
### Writing UX text for form summaries
|
|
38
|
-
|
|
39
|
-
### Multiple fields with same name
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
# Input
|
|
2
|
-
|
|
3
|
-
An input lets users enter and edit text or numerical values in forms.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Variants
|
|
9
|
-
|
|
10
|
-
To be able to use forms in all context's we provide two versions of input fields.
|
|
11
|
-
|
|
12
|
-
- **Default**
|
|
13
|
-
- Coming soon **Floating label** (label inside): Can only be used in specific contexts. Limited features due to accessibility. Read more about how to use the Floating label on the UX text page [Input field floating label](https://seb.io/component/input/ux-text#input-field-floating-label-5)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#### Sizes
|
|
18
|
-
|
|
19
|
-
The input field comes in two sizes.
|
|
20
|
-
|
|
21
|
-
- **Large**
|
|
22
|
-
- **Small**: used in tables and in some special cases where the space is very limited.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Types
|
|
27
|
-
|
|
28
|
-
The input component supports different input types, including text entry and file selection.
|
|
29
|
-
|
|
30
|
-
### Features
|
|
31
|
-
|
|
32
|
-
#### Label
|
|
33
|
-
|
|
34
|
-
All input fields must have a label to ensure clarity and accessibility. Labels help users understand the purpose of the field, including those using assistive technologies.
|
|
35
|
-
|
|
36
|
-
#### Optional field indicator
|
|
37
|
-
|
|
38
|
-
We only ask for required information. If some fields are optional, we let users know by adding "(optional)" in brackets next to the field label.
|
|
39
|
-
|
|
40
|
-
#### Support text
|
|
41
|
-
|
|
42
|
-
Use this to explain how to fill in the field, for example how to count or what to include.
|
|
43
|
-
|
|
44
|
-
### Contextual help
|
|
45
|
-
|
|
46
|
-
If the label and support text are not enough to explain a field, we can use the info icon. Clicking the icon shows additional support text between the label support and the field.
|
|
47
|
-
|
|
48
|
-
- Use a tooltip if space is limited.
|
|
49
|
-
- Use a modal for large amounts of text.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Leading icon
|
|
54
|
-
|
|
55
|
-
A leading icon visually reinforces the purpose of the field, helping users to understand what type of information is needed. For example: search fields or card number.
|
|
56
|
-
|
|
57
|
-
#### Clearable
|
|
58
|
-
|
|
59
|
-
To make it easy for users to clear a field, an x-icon button can be placed at the end of the field. This is commonly used in search/filter forms.
|
|
60
|
-
|
|
61
|
-
#### Badge
|
|
62
|
-
|
|
63
|
-
Use it to show what the unit input value is.
|
|
64
|
-
|
|
65
|
-
For example: EUR
|
|
66
|
-
|
|
67
|
-
#### Error message
|
|
68
|
-
|
|
69
|
-
Used to indicate that a selection must be made from the dropdown or that there is an error with the selected option.
|
|
70
|
-
|
|
71
|
-
#### Character counter
|
|
72
|
-
|
|
73
|
-
For fields with a character limit, a counter can be added to show users how many characters they have left.
|
|
74
|
-
|
|
75
|
-
The counter starts with the maximum allowed characters. As the user types, the remaining characters decrease. When the limit is nearly reached, the counter turns yellow. When or if the user exceeds the limit, the counter turns red.
|
|
76
|
-
|
|
77
|
-
If the user ignores this and attempts to submit, an error message will appear indicating that the maximum character limit has been reached.
|
|
78
|
-
|
|
79
|
-
#### Dynamic information
|
|
80
|
-
|
|
81
|
-
(Not available for Floating label variant) Used to perform comparative calculations next to the field.
|
|
82
|
-
|
|
83
|
-
#### Placeholder
|
|
84
|
-
|
|
85
|
-
Avoid using placeholder text (also known as watermark), as it can confuse users into thinking the field is already filled with data. Instructions should not be placed in the field, as they disappear once the user starts typing. Instead, use support text to guide users on what should be entered.
|
|
86
|
-
|
|
87
|
-
### Read only
|
|
88
|
-
|
|
89
|
-
The read only state displays the entered value together with its label. Have no visual cues associated with text entry, such as an active input cursor or editable states. Long content should remain readable and should not be unnecessarily truncated.
|
|
90
|
-
[More about the read only pattern](https://seb.io/patterns/read-only)
|
|
91
|
-
|
|
92
|
-
### Do’s and dont’s
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## UX Guidelines
|
|
96
|
-
|
|
97
|
-
### Input field default
|
|
98
|
-
|
|
99
|
-
### Labels
|
|
100
|
-
|
|
101
|
-
### Single-word or complete sentence
|
|
102
|
-
|
|
103
|
-
### Write the time period in the label
|
|
104
|
-
|
|
105
|
-
### Avoid fixed text inside the field
|
|
106
|
-
|
|
107
|
-
### Display the currency with a badge
|
|
108
|
-
|
|
109
|
-
### Placeholder text
|
|
110
|
-
|
|
111
|
-
### Labels do’s and dont’s
|
|
112
|
-
|
|
113
|
-
### Error message
|
|
114
|
-
|
|
115
|
-
### Input field floating label
|
|
116
|
-
|
|
117
|
-
### Do’s and dont’s input field floating label
|
|
118
|
-
|
|
119
|
-
### Default or floating label?
|
|
120
|
-
|
|
121
|
-
### Search field
|
|
122
|
-
|
|
123
|
-
### Label support text for search field
|
|
124
|
-
|
|
125
|
-
### Give ideas with examples
|
|
126
|
-
|
|
127
|
-
### Search feedback
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Link
|
|
2
|
-
|
|
3
|
-
A link navigates users to other pages or sections of content.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Usage
|
|
9
|
-
|
|
10
|
-
Use links for navigation whether it’s within the same page, across pages, or to external sites. A good link is easy to recognize, descriptive, and accessible. It should clearly communicate where it will take the user, even when read out of context (for example, by a screen reader). Avoid using links for actions such as submitting forms or opening modals use buttons instead.
|
|
11
|
-
|
|
12
|
-
### Variants
|
|
13
|
-
|
|
14
|
-
#### Leading icon
|
|
15
|
-
|
|
16
|
-
Use when an icon helps reinforce the meaning of the link (e.g., a document or download icon before the text).
|
|
17
|
-
|
|
18
|
-
#### Trailing icon
|
|
19
|
-
|
|
20
|
-
Use for links that lead to another page or outside the current application, such as external websites.
|
|
21
|
-
|
|
22
|
-
#### Text decoration
|
|
23
|
-
|
|
24
|
-
Used when a stronger visual indication is needed for example, in long bodies of text or when links need to stand out clearly from surrounding content.
|
|
25
|
-
|
|
26
|
-
### Do’s and don’ts
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## UX Guidelines
|
|
30
|
-
|
|
31
|
-
### Writing UX text for links
|
|
32
|
-
|
|
33
|
-
### Only include necessary words
|
|
34
|
-
|
|
35
|
-
### Placing links
|
|
36
|
-
|
|
37
|
-
### Links within text
|
|
38
|
-
|
|
39
|
-
### Link outside of the text
|
|
40
|
-
|
|
41
|
-
### Links before a form component
|
|
42
|
-
|
|
43
|
-
### Add items to a list
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# List
|
|
2
|
-
|
|
3
|
-
A list arranges related list items in a consistent vertical layout.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### List item
|
|
9
|
-
|
|
10
|
-
A List item is a semantic container with no predefined internal layout. It provides a single content slot, allowing patterns or custom layouts to be projected into each item.
|
|
11
|
-
|
|
12
|
-
### Accessibility
|
|
13
|
-
|
|
14
|
-
The List component uses semantic list markup to communicate the relationship between list items, improving navigation and accessibility for assistive technologies.
|
|
15
|
-
|
|
16
|
-
### Do's and don'ts
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# List item pattern 01
|
|
2
|
-
|
|
3
|
-
List item Pattern 01 provides a predefined layout for displaying structured information in a list.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### When to use
|
|
9
|
-
|
|
10
|
-
Use Pattern 01 when displaying structured information that users need to scan, compare or interact with. Common examples include:
|
|
11
|
-
|
|
12
|
-
### Layout examples
|
|
13
|
-
|
|
14
|
-
### Interaction
|
|
15
|
-
|
|
16
|
-
Pattern 01 supports both static and interactive list items.
|
|
17
|
-
|
|
18
|
-
Depending on the use case, a list item can be:
|
|
19
|
-
|
|
20
|
-
- **Static** – displays information without interaction.
|
|
21
|
-
- **Selectable** – allows users to select one or more items.
|
|
22
|
-
- **Navigational** – takes users to another view or destination.
|
|
23
|
-
- **Selectable and navigational** – supports both selection and navigation within the same item.
|
|
24
|
-
|
|
25
|
-
Use the same interaction pattern consistently throughout a list to create a predictable user experience.
|
|
26
|
-
|
|
27
|
-
### Slots
|
|
28
|
-
|
|
29
|
-
List item pattern 01 is built around three slots that help organise content in a consistent and predictable way.
|
|
30
|
-
|
|
31
|
-
#### Lead slot
|
|
32
|
-
|
|
33
|
-
Use for icons, avatars, or custom leading content. When `selectable` is enabled, it shows a checkbox.
|
|
34
|
-
|
|
35
|
-
#### Content slot
|
|
36
|
-
|
|
37
|
-
The Content slot is fully customizable and can contain any content needed for your use case.
|
|
38
|
-
|
|
39
|
-
For the recommended layout, use the `Items` property. It provides predefined content styles and supports one, two or three content columns, making it easy to create consistent and scannable list items.
|
|
40
|
-
|
|
41
|
-
If your layout requires more flexibility than the `Items` property supports, you can instead provide custom content through the Content slot.
|
|
42
|
-
|
|
43
|
-
#### Trail slot
|
|
44
|
-
|
|
45
|
-
Use the **Trail** slot for secondary content, such as values, status, metadata or actions. Keep trailing content concise and avoid placing the primary information here.
|
|
46
|
-
|
|
47
|
-
When a list item is configured as navigational**** (`href)`, a chevron icon is automatically displayed in the Trail slot. When configured as `selectable`**** and**** `navigational`, the Trail slot instead displays an icon button with a chevron icon, indicating both selection and navigation.
|
|
48
|
-
|
|
49
|
-
### Do's and don'ts
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Menu button
|
|
2
|
-
|
|
3
|
-
A menu button combines button and link behaviors for navigation menus.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Usage
|
|
9
|
-
|
|
10
|
-
Use the menu button to create clear and accessible navigation. Choose the appropriate combination of text and icon depending on the context:
|
|
11
|
-
|
|
12
|
-
* **Text only** is best for straightforward links where the label clearly communicates the destination.
|
|
13
|
-
|
|
14
|
-
* **Text with icon** adds clarity, especially when the icon reinforces the meaning (e.g., a user icon for profile-related links).
|
|
15
|
-
|
|
16
|
-
* **Icon only** can be used when space is limited, but only if the icon is widely recognized and its meaning is clear.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Menu buttons have a selected state that visually indicate the current page or section.
|
|
20
|
-
|
|
21
|
-
### Sizes
|
|
22
|
-
|
|
23
|
-
The menu button comes in three sizes to fit different layout needs and navigation contexts:
|
|
24
|
-
|
|
25
|
-
* **Large** - Typically used in primary navigation where space allows for larger, more prominent buttons. It provides good readability and clear touch targets.
|
|
26
|
-
|
|
27
|
-
* **Medium** - Works well when space is limited but readability and clarity are still important.
|
|
28
|
-
|
|
29
|
-
* **Small** - Optimized for tighter layouts and smaller viewports. The text and icon are vertically aligned to maintain visual balance in compact spaces, such as in mobile navigation or secondary toolbars.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Regardless of size, the height of the menu button will adapt to match the height set by the container. This ensures consistent alignment and spacing across the entire navigation.
|
|
33
|
-
|
|
34
|
-
### Do's and don'ts
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## UX Guidelines
|
|
38
|
-
|
|
39
|
-
### Writing UX text for menu buttons
|