@fundamental-styles/mcp 0.41.7-rc.8 → 0.41.7
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/AI_USAGE.md +425 -0
- package/data/CHANGELOG.md +53 -3
- package/data/component-catalog.json +62 -209
- package/data/components/README.md +281 -0
- package/data/components/action-bar.md +443 -0
- package/data/components/ai-busy-indicator.md +79 -0
- package/data/components/ai-loading-bar.md +66 -0
- package/data/components/avatar-btp.md +198 -0
- package/data/components/avatar-group.md +2660 -0
- package/data/components/avatar-product-switch.md +476 -0
- package/data/components/avatar.md +993 -0
- package/data/components/bar.md +574 -0
- package/data/components/border-radius.md +148 -0
- package/data/components/border.md +412 -0
- package/data/components/breadcrumb.md +546 -0
- package/data/components/button-2.md +440 -0
- package/data/components/button-action-sheet.md +292 -0
- package/data/components/button-ai.md +730 -0
- package/data/components/button-btp.md +223 -0
- package/data/components/button-button.md +233 -0
- package/data/components/button-counter.md +176 -0
- package/data/components/button-patterns.md +731 -0
- package/data/components/button-split.md +459 -0
- package/data/components/button.md +469 -0
- package/data/components/calendar.md +5784 -0
- package/data/components/card-card-media.md +707 -0
- package/data/components/card-card.md +2426 -0
- package/data/components/card-layouts.md +1201 -0
- package/data/components/card.md +2404 -0
- package/data/components/carousel.md +1506 -0
- package/data/components/code.md +139 -0
- package/data/components/component-reset.md +272 -0
- package/data/components/components-icons-businesssuiteinappsymbol-icons.md +85 -0
- package/data/components/components-icons-sap-icons.md +147 -0
- package/data/components/components-icons-tnt-icons.md +85 -0
- package/data/components/container-queries.md +221 -0
- package/data/components/container.md +227 -0
- package/data/components/dialog-docs-static-busy-indicator.md +165 -0
- package/data/components/dialog-docs-static-dialog.md +949 -0
- package/data/components/dialog-docs-static-patterns.md +147 -0
- package/data/components/dialog-docs-static-settings.md +528 -0
- package/data/components/dialog-docs-static.md +982 -0
- package/data/components/dialog.md +606 -0
- package/data/components/dynamic-page-dynamic-page.md +1914 -0
- package/data/components/dynamic-page.md +973 -0
- package/data/components/dynamic-side.md +197 -0
- package/data/components/elevation.md +110 -0
- package/data/components/feed-input.md +346 -0
- package/data/components/feed-list.md +580 -0
- package/data/components/fieldset-2.md +292 -0
- package/data/components/fieldset-forms.md +169 -0
- package/data/components/fieldset.md +381 -0
- package/data/components/flexible-column-layout.md +205 -0
- package/data/components/form-group.md +287 -0
- package/data/components/form-header.md +71 -0
- package/data/components/form-item-2.md +98 -0
- package/data/components/form-item-3.md +134 -0
- package/data/components/form-item-4.md +556 -0
- package/data/components/form-item-5.md +182 -0
- package/data/components/form-item-6.md +539 -0
- package/data/components/form-item-7.md +239 -0
- package/data/components/form-item-ai.md +158 -0
- package/data/components/form-item-file-uploader.md +445 -0
- package/data/components/form-item-forms.md +234 -0
- package/data/components/form-item-patterns.md +426 -0
- package/data/components/form-item.md +464 -0
- package/data/components/form-label-ai.md +126 -0
- package/data/components/form-label-layouts.md +306 -0
- package/data/components/form-label-patterns.md +1175 -0
- package/data/components/form-label-status-indicator.md +1083 -0
- package/data/components/form-label-step-input.md +620 -0
- package/data/components/form-label.md +2876 -0
- package/data/components/generic-tag.md +747 -0
- package/data/components/grid-list-grid-list.md +1185 -0
- package/data/components/grid-list.md +1449 -0
- package/data/components/heading.md +66 -0
- package/data/components/horizontal-navigation.md +568 -0
- package/data/components/icon-tab-bar-dev.md +190 -0
- package/data/components/icon-tab-bar.md +2620 -0
- package/data/components/icon.md +171 -0
- package/data/components/iconBusinessSuite.md +92 -0
- package/data/components/iconTnt.md +92 -0
- package/data/components/illustrated-message.md +439 -0
- package/data/components/info-label.md +348 -0
- package/data/components/input-group.md +2068 -0
- package/data/components/label.md +66 -0
- package/data/components/layout-grid.md +447 -0
- package/data/components/layout-panel.md +261 -0
- package/data/components/layouts-layout-grid.md +608 -0
- package/data/components/layouts-paddings.md +133 -0
- package/data/components/layouts-section.md +287 -0
- package/data/components/list-2.md +148 -0
- package/data/components/list-3.md +735 -0
- package/data/components/list-list.md +790 -0
- package/data/components/list-object-list.md +1225 -0
- package/data/components/list.md +1286 -0
- package/data/components/media-queries.md +168 -0
- package/data/components/menu.md +946 -0
- package/data/components/message-box-docs-static-ai.md +149 -0
- package/data/components/message-box-docs-static.md +527 -0
- package/data/components/message-page-upload-collection.md +678 -0
- package/data/components/message-page.md +256 -0
- package/data/components/message-strip.md +977 -0
- package/data/components/message-toast.md +119 -0
- package/data/components/micro-process-flow.md +991 -0
- package/data/components/navigation-menu.md +366 -0
- package/data/components/navigation-navigation.md +1245 -0
- package/data/components/navigation.md +2604 -0
- package/data/components/numeric-content.md +317 -0
- package/data/components/object-attribute.md +96 -0
- package/data/components/object-identifier.md +227 -0
- package/data/components/object-marker.md +202 -0
- package/data/components/object-number.md +327 -0
- package/data/components/object-status.md +1538 -0
- package/data/components/off-screen.md +87 -0
- package/data/components/overflow.md +97 -0
- package/data/components/padding.md +122 -0
- package/data/components/paddings.md +130 -0
- package/data/components/page.md +300 -0
- package/data/components/pagination.md +672 -0
- package/data/components/panel-layouts.md +345 -0
- package/data/components/panel.md +514 -0
- package/data/components/patterns-label.md +74 -0
- package/data/components/popover-2.md +906 -0
- package/data/components/popover-ai.md +466 -0
- package/data/components/popover-btp.md +886 -0
- package/data/components/popover-deprecated.md +308 -0
- package/data/components/popover-message-popover.md +683 -0
- package/data/components/popover-notification.md +1511 -0
- package/data/components/popover-patterns.md +1100 -0
- package/data/components/popover-popover.md +1862 -0
- package/data/components/popover-quick-view.md +385 -0
- package/data/components/popover-timepicker.md +1836 -0
- package/data/components/popover-user-menu.md +1303 -0
- package/data/components/popover.md +1938 -0
- package/data/components/progress-indicator.md +351 -0
- package/data/components/prompt-input-ai.md +226 -0
- package/data/components/prompt-input.md +226 -0
- package/data/components/rating-indicator.md +1469 -0
- package/data/components/resizable-card-layout.md +951 -0
- package/data/components/scrollbar.md +86 -0
- package/data/components/search-field.md +287 -0
- package/data/components/section.md +250 -0
- package/data/components/segmented-button.md +324 -0
- package/data/components/shellbar.md +2183 -0
- package/data/components/side-nav.md +1562 -0
- package/data/components/skeleton.md +243 -0
- package/data/components/slider.md +395 -0
- package/data/components/splitter.md +353 -0
- package/data/components/table.md +2749 -0
- package/data/components/tabs.md +658 -0
- package/data/components/text-text.md +380 -0
- package/data/components/text.md +253 -0
- package/data/components/tile.md +1132 -0
- package/data/components/time.md +818 -0
- package/data/components/title.md +153 -0
- package/data/components/titles.md +83 -0
- package/data/components/token.md +311 -0
- package/data/components/tokenizer.md +398 -0
- package/data/components/tool-header.md +1352 -0
- package/data/components/tool-layout.md +199 -0
- package/data/components/toolbar-ai.md +174 -0
- package/data/components/toolbar-btp.md +526 -0
- package/data/components/toolbar-title-bar.md +473 -0
- package/data/components/toolbar.md +432 -0
- package/data/components/tree.md +1031 -0
- package/data/components/typography.md +435 -0
- package/data/components/variant-management.md +360 -0
- package/data/components/vertical-nav.md +589 -0
- package/data/components/wizard.md +1429 -0
- package/data/examples/Components/dialog/device-specifications.example.html +39 -30
- package/data/examples/Components/shellbar/optional-items.example.html +210 -157
- package/data/examples/Components/shellbar/overflow-toolbar.example.html +202 -177
- package/data/examples/Components/shellbar/responsive-paddings.example.html +217 -146
- package/data/examples/Components/shellbar/responsiveness.example.html +825 -613
- package/data/examples/Components/user-menu/default.example.html +241 -83
- package/data/schemas/badge.schema.json +1 -1
- package/data/schemas/button-split.schema.json +1 -1
- package/data/schemas/component-frontmatter.schema.json +123 -0
- package/data/schemas/component-markdown.schema.json +81 -0
- package/data/schemas/counter.schema.json +1 -1
- package/data/schemas/dynamic-page.schema.json +1 -1
- package/data/schemas/dynamic-side-content.schema.json +1 -1
- package/data/schemas/facet.schema.json +1 -1
- package/data/schemas/fieldset.schema.json +1 -1
- package/data/schemas/flexible-column-layout.schema.json +1 -1
- package/data/schemas/form-group.schema.json +3 -2
- package/data/schemas/form-header.schema.json +1 -1
- package/data/schemas/form-label.schema.json +1 -0
- package/data/schemas/form-message.schema.json +1 -1
- package/data/schemas/grid-list.schema.json +1 -1
- package/data/schemas/input-group.schema.json +1 -1
- package/data/schemas/layout-panel.schema.json +1 -1
- package/data/schemas/page.schema.json +1 -1
- package/data/schemas/quick-view.schema.json +2 -1
- package/data/schemas/section.schema.json +1 -1
- package/data/schemas/side-nav.schema.json +1 -1
- package/data/schemas/splitter.schema.json +1 -1
- package/data/schemas/tabs.schema.json +1 -1
- package/data/schemas/tile.schema.json +1 -1
- package/data/schemas/tool-layout.schema.json +1 -1
- package/data/schemas/user-menu.schema.json +10 -0
- package/data/schemas/wizard.schema.json +1 -1
- package/package.json +1 -1
- package/src/data/load-catalog.d.ts +2 -0
- package/src/data/load-catalog.js +5 -1
- package/src/data/load-catalog.js.map +1 -1
- package/src/data/load-markdown-docs.d.ts +44 -0
- package/src/data/load-markdown-docs.js +179 -0
- package/src/data/load-markdown-docs.js.map +1 -0
- package/src/data/markdown-cache.d.ts +60 -0
- package/src/data/markdown-cache.js +218 -0
- package/src/data/markdown-cache.js.map +1 -0
- package/src/server.js +72 -1
- package/src/server.js.map +1 -1
|
@@ -0,0 +1,946 @@
|
|
|
1
|
+
---
|
|
2
|
+
component: fd-menu
|
|
3
|
+
title: Components/Menu
|
|
4
|
+
category: Components
|
|
5
|
+
selector: fd-menu
|
|
6
|
+
cssFile: menu.css
|
|
7
|
+
sourcePath: packages/styles/stories/Components/menu/menu.stories.js
|
|
8
|
+
tags: []
|
|
9
|
+
dependencies: ["bar","button","dialog","icon","input","menu","title"]
|
|
10
|
+
relatedComponents: ["bar","button","dialog","icon","input","menu","title"]
|
|
11
|
+
stability: stable
|
|
12
|
+
generatedAt: 2026-06-09T18:29:01.334Z
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Components/Menu
|
|
16
|
+
|
|
17
|
+
The menu component is the listing structure with optional headers to create menus.
|
|
18
|
+
|
|
19
|
+
Commonly used as the contents when composing "dropdowns", "contextual menus", etc, when paired with the popover component.
|
|
20
|
+
|
|
21
|
+
## Dependencies
|
|
22
|
+
|
|
23
|
+
This component depends on the following CSS files:
|
|
24
|
+
|
|
25
|
+
- `bar.css`
|
|
26
|
+
- `button.css`
|
|
27
|
+
- `dialog.css`
|
|
28
|
+
- `icon.css`
|
|
29
|
+
- `input.css`
|
|
30
|
+
- `menu.css`
|
|
31
|
+
- `title.css`
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install fundamental-styles
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<!-- Include theme -->
|
|
41
|
+
<link href="node_modules/fundamental-styles/dist/theming/sap_horizon.css" rel="stylesheet">
|
|
42
|
+
|
|
43
|
+
<!-- Include component CSS -->
|
|
44
|
+
<link href="node_modules/fundamental-styles/dist/menu.css" rel="stylesheet">
|
|
45
|
+
|
|
46
|
+
<!-- Include dependencies -->
|
|
47
|
+
<link href="node_modules/fundamental-styles/dist/bar.css" rel="stylesheet">
|
|
48
|
+
<link href="node_modules/fundamental-styles/dist/button.css" rel="stylesheet">
|
|
49
|
+
<link href="node_modules/fundamental-styles/dist/dialog.css" rel="stylesheet">
|
|
50
|
+
<link href="node_modules/fundamental-styles/dist/icon.css" rel="stylesheet">
|
|
51
|
+
<link href="node_modules/fundamental-styles/dist/input.css" rel="stylesheet">
|
|
52
|
+
<link href="node_modules/fundamental-styles/dist/menu.css" rel="stylesheet">
|
|
53
|
+
<link href="node_modules/fundamental-styles/dist/title.css" rel="stylesheet">
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Basic Usage
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<nav aria-label="navigation menu" class="fd-menu">
|
|
60
|
+
<ul class="fd-menu__list" role="menu">
|
|
61
|
+
<li class="fd-menu__item" role="presentation">
|
|
62
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
63
|
+
<span class="fd-menu__title">Option 1</span>
|
|
64
|
+
</a>
|
|
65
|
+
</li>
|
|
66
|
+
<li class="fd-menu__item" role="presentation">
|
|
67
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
68
|
+
<span class="fd-menu__title">Option 2</span>
|
|
69
|
+
</a>
|
|
70
|
+
</li>
|
|
71
|
+
<li class="fd-menu__item" role="presentation">
|
|
72
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
73
|
+
<span class="fd-menu__title">Option 3</span>
|
|
74
|
+
</a>
|
|
75
|
+
</li>
|
|
76
|
+
<li class="fd-menu__item" role="presentation">
|
|
77
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
78
|
+
<span class="fd-menu__title">Option 4</span>
|
|
79
|
+
</a>
|
|
80
|
+
</li>
|
|
81
|
+
</ul>
|
|
82
|
+
</nav>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Modifiers
|
|
86
|
+
|
|
87
|
+
| Class | Description |
|
|
88
|
+
|-------|-------------|
|
|
89
|
+
| `fd-menu--icons` | Style variant |
|
|
90
|
+
| `fd-menu--mobile` | The basic structure of a menu in mobile where it opens as a dialog |
|
|
91
|
+
| `fd-menu--overflow` | The `fd-menu--overflow` modifier class will clip the content and add a vertical scroll to the element |
|
|
92
|
+
|
|
93
|
+
## States
|
|
94
|
+
|
|
95
|
+
| Class | Description |
|
|
96
|
+
|-------|-------------|
|
|
97
|
+
| `is-active` | Active state |
|
|
98
|
+
| `is-disabled` | Disabled state |
|
|
99
|
+
| `is-expanded` | Expanded state |
|
|
100
|
+
| `is-focus` | Focus state |
|
|
101
|
+
| `is-hover` | Hover state |
|
|
102
|
+
| `is-selected` | Selected state |
|
|
103
|
+
|
|
104
|
+
## BEM Elements
|
|
105
|
+
|
|
106
|
+
This component uses the following BEM elements:
|
|
107
|
+
|
|
108
|
+
- `fd-menu__active-dot`
|
|
109
|
+
- `fd-menu__addon-after`
|
|
110
|
+
- `fd-menu__addon-after--active`
|
|
111
|
+
- `fd-menu__addon-after--submenu`
|
|
112
|
+
- `fd-menu__addon-before`
|
|
113
|
+
- `fd-menu__checkmark`
|
|
114
|
+
- `fd-menu__content`
|
|
115
|
+
- `fd-menu__input`
|
|
116
|
+
- `fd-menu__item`
|
|
117
|
+
- `fd-menu__link`
|
|
118
|
+
- `fd-menu__list`
|
|
119
|
+
- `fd-menu__list--no-shadow`
|
|
120
|
+
- `fd-menu__shortcut`
|
|
121
|
+
- `fd-menu__sublist`
|
|
122
|
+
- `fd-menu__subtitle`
|
|
123
|
+
- `fd-menu__title`
|
|
124
|
+
|
|
125
|
+
## Related Components
|
|
126
|
+
|
|
127
|
+
This component works with or depends on:
|
|
128
|
+
|
|
129
|
+
- `bar`
|
|
130
|
+
- `button`
|
|
131
|
+
- `dialog`
|
|
132
|
+
- `icon`
|
|
133
|
+
- `input`
|
|
134
|
+
- `menu`
|
|
135
|
+
- `title`
|
|
136
|
+
|
|
137
|
+
## Design Tokens
|
|
138
|
+
|
|
139
|
+
Key CSS variables used by this component:
|
|
140
|
+
|
|
141
|
+
- `--active`
|
|
142
|
+
- `--fdButton_Menu_Border_Radius`
|
|
143
|
+
- `--fdMenu_Active_Dot_Size`
|
|
144
|
+
- `--fdMenu_Active_State_Focus`
|
|
145
|
+
- `--fdMenu_Affordance_Arrow_Size`
|
|
146
|
+
- `--fdMenu_Icon_Color`
|
|
147
|
+
- `--fdMenu_Icon_Width`
|
|
148
|
+
- `--fdMenu_Item_Background_Color`
|
|
149
|
+
- `--fdMenu_Item_Border_Bottom_Color`
|
|
150
|
+
- `--fdMenu_Item_Spacing_Left`
|
|
151
|
+
- `--fdMenu_Item_Spacing_Right`
|
|
152
|
+
- `--fdMenu_Link_Height`
|
|
153
|
+
- `--fdMenu_Shortcut_Color`
|
|
154
|
+
- `--fdMenu_Shortcut_Color_Active`
|
|
155
|
+
- `--fdMenu_Shortcut_Color_Regular`
|
|
156
|
+
|
|
157
|
+
*...and 5 more*
|
|
158
|
+
|
|
159
|
+
## Examples
|
|
160
|
+
|
|
161
|
+
### Default
|
|
162
|
+
|
|
163
|
+
The basic structure of a menu. Place the menu item title in a \
|
|
164
|
+
|
|
165
|
+
```html
|
|
166
|
+
<nav aria-label="navigation menu" class="fd-menu">
|
|
167
|
+
<ul class="fd-menu__list" role="menu">
|
|
168
|
+
<li class="fd-menu__item" role="presentation">
|
|
169
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
170
|
+
<span class="fd-menu__title">Option 1</span>
|
|
171
|
+
</a>
|
|
172
|
+
</li>
|
|
173
|
+
<li class="fd-menu__item" role="presentation">
|
|
174
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
175
|
+
<span class="fd-menu__title">Option 2</span>
|
|
176
|
+
</a>
|
|
177
|
+
</li>
|
|
178
|
+
<li class="fd-menu__item" role="presentation">
|
|
179
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
180
|
+
<span class="fd-menu__title">Option 3</span>
|
|
181
|
+
</a>
|
|
182
|
+
</li>
|
|
183
|
+
<li class="fd-menu__item" role="presentation">
|
|
184
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
185
|
+
<span class="fd-menu__title">Option 4</span>
|
|
186
|
+
</a>
|
|
187
|
+
</li>
|
|
188
|
+
</ul>
|
|
189
|
+
</nav>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Vertical overflow
|
|
193
|
+
|
|
194
|
+
The `fd-menu--overflow` modifier class will clip the content and add a vertical scroll to the element. You need to manually set the max-height of the element on the `fd-menu` level. For example: `style=
|
|
195
|
+
|
|
196
|
+
```html
|
|
197
|
+
<nav aria-label="navigation menu" class="fd-menu fd-menu--overflow">
|
|
198
|
+
<ul class="fd-menu__list" role="menu">
|
|
199
|
+
<li class="fd-menu__item" role="presentation">
|
|
200
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
201
|
+
<span class="fd-menu__title">Option 1</span>
|
|
202
|
+
</a>
|
|
203
|
+
</li>
|
|
204
|
+
<li class="fd-menu__item" role="presentation">
|
|
205
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
206
|
+
<span class="fd-menu__title">Option 2</span>
|
|
207
|
+
</a>
|
|
208
|
+
</li>
|
|
209
|
+
<li class="fd-menu__item" role="presentation">
|
|
210
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
211
|
+
<span class="fd-menu__title">Option 3</span>
|
|
212
|
+
</a>
|
|
213
|
+
</li>
|
|
214
|
+
<li class="fd-menu__item" role="presentation">
|
|
215
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
216
|
+
<span class="fd-menu__title">Option 4</span>
|
|
217
|
+
</a>
|
|
218
|
+
</li>
|
|
219
|
+
</ul>
|
|
220
|
+
</nav>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### MobileMode
|
|
224
|
+
|
|
225
|
+
The basic structure of a menu in mobile where it opens as a dialog. Use class `fd-menu--mobile` on menu container level. Example shows the parent menu\
|
|
226
|
+
|
|
227
|
+
```html
|
|
228
|
+
<div
|
|
229
|
+
|
|
230
|
+
class="fd-dialog fd-dialog-docs-static fd-select-docs-max-height fd-dialog--active"
|
|
231
|
+
id="select-dialog-example"
|
|
232
|
+
>
|
|
233
|
+
<section aria-labelledby="exampleSubMenuHeader" class="fd-dialog__content fd-dialog__content--mobile" role="dialog">
|
|
234
|
+
<header aria-label="bar-header" class="fd-dialog__header fd-bar fd-bar--header">
|
|
235
|
+
|
|
236
|
+
</header>
|
|
237
|
+
<div class="fd-dialog__body fd-dialog__body--no-vertical-padding">
|
|
238
|
+
<nav
|
|
239
|
+
aria-label="example sub-menu options"
|
|
240
|
+
class="fd-menu fd-menu--mobile fd-menu--icons"
|
|
241
|
+
id="parent-menu"
|
|
242
|
+
tabindex="-1"
|
|
243
|
+
>
|
|
244
|
+
<ul class="fd-menu__list" role="menu">
|
|
245
|
+
<li class="fd-menu__item" role="presentation">
|
|
246
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
247
|
+
<span class="fd-menu__addon-before"
|
|
248
|
+
><i class="sap-icon--grid" role="presentation"></i
|
|
249
|
+
></span>
|
|
250
|
+
<span class="fd-menu__title">Option 1</span>
|
|
251
|
+
<span class="fd-menu__addon-after"
|
|
252
|
+
><i class="sap-icon--wrench" role="presentation"></i
|
|
253
|
+
></span>
|
|
254
|
+
</a>
|
|
255
|
+
</li>
|
|
256
|
+
<li class="fd-menu__item" role="presentation">
|
|
257
|
+
<a class="fd-menu__link is-active" href="#" role="menuitem">
|
|
258
|
+
<span class="fd-menu__addon-before"
|
|
259
|
+
><i class="sap-icon--accept" role="presentation"></i
|
|
260
|
+
></span>
|
|
261
|
+
<span class="fd-menu__title">Option 2</span>
|
|
262
|
+
<span class="fd-menu__addon-after fd-menu__addon-after--submenu"></span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
265
|
+
<li class="fd-menu__item" role="presentation">
|
|
266
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
267
|
+
<span class="fd-menu__title">Option 3</span>
|
|
268
|
+
<span class="fd-menu__addon-after"
|
|
269
|
+
><i class="sap-icon--lightbulb" role="presentation"></i
|
|
270
|
+
></span>
|
|
271
|
+
</a>
|
|
272
|
+
</li>
|
|
273
|
+
<li class="fd-menu__item" role="presentation">
|
|
274
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
275
|
+
<span class="fd-menu__addon-before"
|
|
276
|
+
><i class="sap-icon--grid" role="presentation"></i
|
|
277
|
+
></span>
|
|
278
|
+
<span class="fd-menu__title">Option 4</span>
|
|
279
|
+
<span class="fd-menu__addon-after"
|
|
280
|
+
><i class="sap-icon--history" role="presentation"></i
|
|
281
|
+
></span>
|
|
282
|
+
</a>
|
|
283
|
+
</li>
|
|
284
|
+
<li class="fd-menu__item" role="presentation">
|
|
285
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
286
|
+
<span class="fd-menu__addon-before"
|
|
287
|
+
><i class="sap-icon--grid" role="presentation"></i
|
|
288
|
+
></span>
|
|
289
|
+
<span class="fd-menu__title">Option 4</span>
|
|
290
|
+
<span class="fd-menu__shortcut">Ctrl+Alt+L</span>
|
|
291
|
+
</a>
|
|
292
|
+
</li>
|
|
293
|
+
</ul>
|
|
294
|
+
</nav>
|
|
295
|
+
</div>
|
|
296
|
+
<footer class="fd-dialog__footer fd-bar fd-bar--footer">
|
|
297
|
+
<div class="fd-bar__right">
|
|
298
|
+
<div class="fd-bar__element">
|
|
299
|
+
<button
|
|
300
|
+
aria-label="close options dialog"
|
|
301
|
+
class="fd-button fd-button--light fd-dialog__decisive-button"
|
|
302
|
+
>
|
|
303
|
+
Cancel
|
|
304
|
+
</button>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
</footer>
|
|
308
|
+
</section>
|
|
309
|
+
|
|
310
|
+
<div
|
|
311
|
+
|
|
312
|
+
class="fd-dialog fd-dialog-docs-static fd-select-docs-max-height fd-dialog--active"
|
|
313
|
+
id="select-dialog-example-inner"
|
|
314
|
+
>
|
|
315
|
+
<section aria-labelledby="subOptionHeader" class="fd-dialog__content fd-dialog__content--mobile" role="dialog">
|
|
316
|
+
<header class="fd-dialog__header fd-bar fd-bar--header">
|
|
317
|
+
<div class="fd-bar__left">
|
|
318
|
+
<div class="fd-bar__element">
|
|
319
|
+
<button aria-label="Show main menu options" class="fd-button fd-button--transparent">
|
|
320
|
+
<i class="sap-icon--navigation-left-arrow" role="presentation"></i>
|
|
321
|
+
</button>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="fd-bar__element">
|
|
324
|
+
<h3 class="fd-title fd-title--h5" id="subOptionHeader">Option 2</h3>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</header>
|
|
328
|
+
<div class="fd-dialog__body fd-dialog__body--no-vertical-padding">
|
|
329
|
+
<nav aria-label="option 2 sub-options" class="fd-menu fd-menu--mobile">
|
|
330
|
+
<ul class="fd-menu__sublist" role="menu">
|
|
331
|
+
<li class="fd-menu__item" role="presentation">
|
|
332
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
333
|
+
<span class="fd-menu__title">Sub-option 1</span>
|
|
334
|
+
</a>
|
|
335
|
+
</li>
|
|
336
|
+
<li class="fd-menu__item" role="presentation">
|
|
337
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
338
|
+
<span class="fd-menu__title">Sub-option 2</span>
|
|
339
|
+
</a>
|
|
340
|
+
</li>
|
|
341
|
+
<li class="fd-menu__item" role="presentation">
|
|
342
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
343
|
+
<span class="fd-menu__title">Sub-option 3</span>
|
|
344
|
+
</a>
|
|
345
|
+
</li>
|
|
346
|
+
<li class="fd-menu__item" role="presentation">
|
|
347
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
348
|
+
<span class="fd-menu__title">Sub-option 4</span>
|
|
349
|
+
</a>
|
|
350
|
+
</li>
|
|
351
|
+
<li class="fd-menu__item" role="presentation">
|
|
352
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
353
|
+
<span class="fd-menu__title"
|
|
354
|
+
>Sub-option 5 with very very very very very very very very very very very very long
|
|
355
|
+
text</span
|
|
356
|
+
>
|
|
357
|
+
</a>
|
|
358
|
+
</li>
|
|
359
|
+
</ul>
|
|
360
|
+
</nav>
|
|
361
|
+
</div>
|
|
362
|
+
<footer class="fd-dialog__footer fd-bar fd-bar--footer">
|
|
363
|
+
<div class="fd-bar__right">
|
|
364
|
+
<div class="fd-bar__element">
|
|
365
|
+
<button
|
|
366
|
+
aria-label="close options dialog"
|
|
367
|
+
class="fd-button fd-button--light fd-dialog__decisive-button"
|
|
368
|
+
>
|
|
369
|
+
Cancel
|
|
370
|
+
</button>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
</footer>
|
|
374
|
+
</section>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### List with separated items
|
|
378
|
+
|
|
379
|
+
Separators can be added between Menu Items by adding the \
|
|
380
|
+
|
|
381
|
+
```html
|
|
382
|
+
<nav class="fd-menu">
|
|
383
|
+
<ul class="fd-menu__list" role="menu">
|
|
384
|
+
<li class="fd-menu__item" role="presentation">
|
|
385
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
386
|
+
<span class="fd-menu__title">Option 1</span>
|
|
387
|
+
</a>
|
|
388
|
+
</li>
|
|
389
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
390
|
+
<a class="fd-menu__link is-selected" href="#" role="menuitem">
|
|
391
|
+
<span class="fd-menu__title">Option 2</span>
|
|
392
|
+
</a>
|
|
393
|
+
</li>
|
|
394
|
+
<li class="fd-menu__item" role="presentation">
|
|
395
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
396
|
+
<span class="fd-menu__title">Option 3</span>
|
|
397
|
+
</a>
|
|
398
|
+
</li>
|
|
399
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
400
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
401
|
+
<span class="fd-menu__title">Option 4</span>
|
|
402
|
+
</a>
|
|
403
|
+
</li>
|
|
404
|
+
<li class="fd-menu__item" role="presentation">
|
|
405
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
406
|
+
<span class="fd-menu__title">Option 5</span>
|
|
407
|
+
</a>
|
|
408
|
+
</li>
|
|
409
|
+
</ul>
|
|
410
|
+
</nav>
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### List different states
|
|
414
|
+
|
|
415
|
+
Simulate different states to show state behaviour between the items.
|
|
416
|
+
|
|
417
|
+
- For simulating hover state, use class \
|
|
418
|
+
|
|
419
|
+
```html
|
|
420
|
+
<nav aria-label="navbar" class="fd-menu">
|
|
421
|
+
<ul class="fd-menu__list" role="menu">
|
|
422
|
+
<li class="fd-menu__item" role="presentation">
|
|
423
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
424
|
+
<span class="fd-menu__title">Option 1- Regular</span>
|
|
425
|
+
</a>
|
|
426
|
+
</li>
|
|
427
|
+
<li class="fd-menu__item" role="presentation">
|
|
428
|
+
<a class="fd-menu__link is-hover" href="#" role="menuitem">
|
|
429
|
+
<span class="fd-menu__title">Option 2 - Hover</span>
|
|
430
|
+
</a>
|
|
431
|
+
</li>
|
|
432
|
+
<li class="fd-menu__item" role="presentation">
|
|
433
|
+
<a class="fd-menu__link is-active" href="#" role="menuitem">
|
|
434
|
+
<span class="fd-menu__title">Option 3 - Active</span>
|
|
435
|
+
</a>
|
|
436
|
+
</li>
|
|
437
|
+
<li class="fd-menu__item" role="presentation">
|
|
438
|
+
<a class="fd-menu__link is-selected" href="#" role="menuitem">
|
|
439
|
+
<span class="fd-menu__title">Option 4 - Selected</span>
|
|
440
|
+
</a>
|
|
441
|
+
</li>
|
|
442
|
+
<li class="fd-menu__item" role="presentation">
|
|
443
|
+
<a class="fd-menu__link is-selected is-hover" href="#" role="menuitem">
|
|
444
|
+
<span class="fd-menu__title">Option 5 - Selected-Hover</span>
|
|
445
|
+
</a>
|
|
446
|
+
</li>
|
|
447
|
+
<li class="fd-menu__item" role="presentation">
|
|
448
|
+
<a class="fd-menu__link is-disabled" href="#" role="menuitem" tabindex="-1">
|
|
449
|
+
<span class="fd-menu__title">Option 6 - Disabled</span>
|
|
450
|
+
</a>
|
|
451
|
+
</li>
|
|
452
|
+
</ul>
|
|
453
|
+
</nav>
|
|
454
|
+
|
|
455
|
+
<nav class="fd-menu fd-menu--icons">
|
|
456
|
+
<ul class="fd-menu__list" role="menu">
|
|
457
|
+
<li class="fd-menu__item" role="presentation">
|
|
458
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
459
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--grid" role="presentation"></i></span>
|
|
460
|
+
<span class="fd-menu__title">Option 1 - Regular</span>
|
|
461
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
462
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
463
|
+
</a>
|
|
464
|
+
</li>
|
|
465
|
+
<li class="fd-menu__item" role="presentation">
|
|
466
|
+
<a class="fd-menu__link is-hover" href="#" role="menuitem">
|
|
467
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
468
|
+
<span class="fd-menu__title">Option 2 - Hover</span>
|
|
469
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
470
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
471
|
+
</a>
|
|
472
|
+
</li>
|
|
473
|
+
<li class="fd-menu__item" role="presentation">
|
|
474
|
+
<a class="fd-menu__link is-active" href="#" role="menuitem">
|
|
475
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
476
|
+
<span class="fd-menu__title">Option 3 - Active</span>
|
|
477
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
478
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--lightbulb" role="presentation"></i></span>
|
|
479
|
+
</a>
|
|
480
|
+
</li>
|
|
481
|
+
<li class="fd-menu__item" role="presentation">
|
|
482
|
+
<a class="fd-menu__link is-selected" href="#" role="menuitem">
|
|
483
|
+
<span class="fd-menu__title">Option 3 - Selected</span>
|
|
484
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
485
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--lightbulb" role="presentation"></i></span>
|
|
486
|
+
</a>
|
|
487
|
+
</li>
|
|
488
|
+
<li class="fd-menu__item" role="presentation">
|
|
489
|
+
<a class="fd-menu__link is-selected is-hover" href="#" role="menuitem">
|
|
490
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
491
|
+
<span class="fd-menu__title">Option 4 - Selected Hover</span>
|
|
492
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
493
|
+
</a>
|
|
494
|
+
</li>
|
|
495
|
+
<li class="fd-menu__item" role="presentation">
|
|
496
|
+
<a class="fd-menu__link is-disabled" href="#" role="menuitem">
|
|
497
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
498
|
+
<span class="fd-menu__title">Option 4 - Disabled</span>
|
|
499
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
500
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
501
|
+
</a>
|
|
502
|
+
</li>
|
|
503
|
+
</ul>
|
|
504
|
+
</nav>
|
|
505
|
+
|
|
506
|
+
<nav class="fd-menu">
|
|
507
|
+
<ul class="fd-menu__list fd-menu__list--no-shadow" role="menu">
|
|
508
|
+
<li class="fd-menu__item" role="presentation">
|
|
509
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
510
|
+
<span class="fd-menu__title">Option 1 - Regular</span>
|
|
511
|
+
</a>
|
|
512
|
+
</li>
|
|
513
|
+
<li class="fd-menu__item" role="presentation">
|
|
514
|
+
<a class="fd-menu__link is-hover" href="#" role="menuitem">
|
|
515
|
+
<span class="fd-menu__title">Option 2 - Hover</span>
|
|
516
|
+
</a>
|
|
517
|
+
</li>
|
|
518
|
+
<li class="fd-menu__item" role="presentation">
|
|
519
|
+
<a class="fd-menu__link is-active" href="#" role="menuitem">
|
|
520
|
+
<span class="fd-menu__title">Option 3 - Active</span>
|
|
521
|
+
</a>
|
|
522
|
+
</li>
|
|
523
|
+
<li class="fd-menu__item" role="presentation">
|
|
524
|
+
<a class="fd-menu__link is-selected" href="#" role="menuitem">
|
|
525
|
+
<span class="fd-menu__title">Option 4 - Selected</span>
|
|
526
|
+
</a>
|
|
527
|
+
</li>
|
|
528
|
+
<li class="fd-menu__item" role="presentation">
|
|
529
|
+
<a class="fd-menu__link is-selected is-hover" href="#" role="menuitem">
|
|
530
|
+
<span class="fd-menu__title">Option 5 - Selected Hover</span>
|
|
531
|
+
</a>
|
|
532
|
+
</li>
|
|
533
|
+
<li class="fd-menu__item is-disabled" role="presentation">
|
|
534
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
535
|
+
<span class="fd-menu__title">Option 6 - Disabled</span>
|
|
536
|
+
</a>
|
|
537
|
+
</li>
|
|
538
|
+
</ul>
|
|
539
|
+
</nav>
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### List with Icon
|
|
543
|
+
|
|
544
|
+
To create an addon before or after \
|
|
545
|
+
|
|
546
|
+
```html
|
|
547
|
+
<nav class="fd-menu fd-menu--icons">
|
|
548
|
+
<ul class="fd-menu__list" role="menu">
|
|
549
|
+
<li class="fd-menu__item" role="presentation">
|
|
550
|
+
<a class="fd-menu__link is-focus" href="#" role="menuitem">
|
|
551
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--grid" role="presentation"></i></span>
|
|
552
|
+
<span class="fd-menu__title">Option 1 Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis deserunt fugiat odio veniam nam similique molestiae adipisci quo quaerat.</span>
|
|
553
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
554
|
+
</a>
|
|
555
|
+
</li>
|
|
556
|
+
<li class="fd-menu__item" role="presentation">
|
|
557
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
558
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
559
|
+
<span class="fd-menu__title">Option 2</span>
|
|
560
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
561
|
+
</a>
|
|
562
|
+
</li>
|
|
563
|
+
<li class="fd-menu__item" role="presentation">
|
|
564
|
+
<a class="fd-menu__link is-focus" href="#" role="menuitem">
|
|
565
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
566
|
+
<span class="fd-menu__title">Option 3</span>
|
|
567
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--lightbulb" role="presentation"></i></span>
|
|
568
|
+
</a>
|
|
569
|
+
</li>
|
|
570
|
+
<li class="fd-menu__item" role="presentation">
|
|
571
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
572
|
+
<span class="fd-menu__title">Option lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis deserunt fugiat odio veniam nam similique molestiae adipisci quo quaerat.</span>
|
|
573
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--lightbulb" role="presentation"></i></span>
|
|
574
|
+
</a>
|
|
575
|
+
</li>
|
|
576
|
+
<li class="fd-menu__item" role="presentation">
|
|
577
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
578
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
579
|
+
<span class="fd-menu__title">Option 4</span>
|
|
580
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
581
|
+
</a>
|
|
582
|
+
</li>
|
|
583
|
+
<li class="fd-menu__item" role="presentation">
|
|
584
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
585
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
586
|
+
<span class="fd-menu__title">Option 4</span>
|
|
587
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
588
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
589
|
+
</a>
|
|
590
|
+
</li>
|
|
591
|
+
</ul>
|
|
592
|
+
</nav>
|
|
593
|
+
|
|
594
|
+
<nav class="fd-menu fd-menu--icons">
|
|
595
|
+
<ul class="fd-menu__list" role="menu">
|
|
596
|
+
<li class="fd-menu__item" role="presentation">
|
|
597
|
+
<a class="fd-menu__link is-focus" href="#" role="menuitem">
|
|
598
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--grid" role="presentation"></i></span>
|
|
599
|
+
<div class="fd-menu__content">
|
|
600
|
+
<span class="fd-menu__title">Menu List Item Lorem ipsum dolor sit amet consectetur adipisicing elit.</span>
|
|
601
|
+
<span class="fd-menu__subtitle">Sub-menu List Item Dolore nemo reiciendis consequuntur consequatur vero maxime.</span>
|
|
602
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
603
|
+
</a>
|
|
604
|
+
</li>
|
|
605
|
+
<li class="fd-menu__item" role="presentation">
|
|
606
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
607
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
608
|
+
<div class="fd-menu__content">
|
|
609
|
+
<span class="fd-menu__title">Menu List Item</span>
|
|
610
|
+
<span class="fd-menu__subtitle">Sub-menu List Item</span>
|
|
611
|
+
</div>
|
|
612
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
613
|
+
</a>
|
|
614
|
+
</li>
|
|
615
|
+
<li class="fd-menu__item" role="presentation">
|
|
616
|
+
<a class="fd-menu__link is-focus" href="#" role="menuitem">
|
|
617
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--wrench" role="presentation"></i></span>
|
|
618
|
+
<div class="fd-menu__content">
|
|
619
|
+
<span class="fd-menu__title">Menu List Item</span>
|
|
620
|
+
<span class="fd-menu__subtitle">Sub-menu List Item</span>
|
|
621
|
+
</div>
|
|
622
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--lightbulb" role="presentation"></i></span>
|
|
623
|
+
</a>
|
|
624
|
+
</li>
|
|
625
|
+
<li class="fd-menu__item" role="presentation">
|
|
626
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
627
|
+
<div class="fd-menu__content">
|
|
628
|
+
<span class="fd-menu__title">Menu List Item</span>
|
|
629
|
+
<span class="fd-menu__subtitle">Sub-menu List Item</span>
|
|
630
|
+
</div>
|
|
631
|
+
<span class="fd-menu__addon-after fd-menu__addon-after--active"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
632
|
+
</a>
|
|
633
|
+
</li>
|
|
634
|
+
<li class="fd-menu__item" role="presentation">
|
|
635
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
636
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
637
|
+
<div class="fd-menu__content">
|
|
638
|
+
<span class="fd-menu__title">Menu List Item Lorem ipsum dolor sit amet consectetur adipisicing elit.</span>
|
|
639
|
+
<span class="fd-menu__subtitle">Sub-menu List Item Iusto laboriosam illum maiores at. At provident officiis dolorum nisi.</span>
|
|
640
|
+
</div>
|
|
641
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
642
|
+
</a>
|
|
643
|
+
</li>
|
|
644
|
+
<li class="fd-menu__item" role="presentation">
|
|
645
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
646
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--cart" role="presentation"></i></span>
|
|
647
|
+
<div class="fd-menu__content">
|
|
648
|
+
<span class="fd-menu__title">Menu List Item</span>
|
|
649
|
+
<span class="fd-menu__subtitle">Sub-menu List Item</span>
|
|
650
|
+
</div>
|
|
651
|
+
<span class="fd-menu__shortcut">Ctrl + A</span>
|
|
652
|
+
<span class="fd-menu__addon-after"><i class="sap-icon--history" role="presentation"></i></span>
|
|
653
|
+
</a>
|
|
654
|
+
</li>
|
|
655
|
+
</ul>
|
|
656
|
+
</nav>
|
|
657
|
+
</div>
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
### WithSubmenu
|
|
661
|
+
|
|
662
|
+
Menu with an additional submenu that can be used for items that can be further grouped under a level but not necessarily visible to user always.
|
|
663
|
+
|
|
664
|
+
For a submenu, do the following:
|
|
665
|
+
- Specify \
|
|
666
|
+
|
|
667
|
+
```html
|
|
668
|
+
<nav class="fd-menu">
|
|
669
|
+
<ul class="fd-menu__list" role="menu">
|
|
670
|
+
<li class="fd-menu__item" role="presentation">
|
|
671
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
672
|
+
<span class="fd-menu__title">Option 1</span>
|
|
673
|
+
</a>
|
|
674
|
+
</li>
|
|
675
|
+
<li class="fd-menu__item" role="presentation">
|
|
676
|
+
<!-- For submenu, have the parent menu item in its own span so that its states do not override the submenu states -->
|
|
677
|
+
<span
|
|
678
|
+
class="fd-menu__link has-child is-expanded"
|
|
679
|
+
aria-controls="EX100M2"
|
|
680
|
+
aria-expanded="true"
|
|
681
|
+
aria-haspopup="true"
|
|
682
|
+
role="menuitem"
|
|
683
|
+
onclick="onPopoverClick('EX100M2')">
|
|
684
|
+
<span class="fd-menu__title">Option 2 with submenu</span>
|
|
685
|
+
<span class="fd-menu__addon-after fd-menu__addon-after--submenu"></span>
|
|
686
|
+
</span>
|
|
687
|
+
<ul class="fd-menu__sublist" id="EX100M2" aria-hidden="false" role="menu">
|
|
688
|
+
<li class="fd-menu__item" role="presentation">
|
|
689
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
690
|
+
<span class="fd-menu__title">Sub-option 1</span>
|
|
691
|
+
</a>
|
|
692
|
+
</li>
|
|
693
|
+
<li class="fd-menu__item" role="presentation">
|
|
694
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
695
|
+
<div class="fd-menu__content">
|
|
696
|
+
<span class="fd-menu__title">Sub-option 1a</span>
|
|
697
|
+
</div>
|
|
698
|
+
<span class="fd-menu__addon-after fd-menu__addon-after--active"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
699
|
+
</a>
|
|
700
|
+
</li>
|
|
701
|
+
<li class="fd-menu__item" role="presentation">
|
|
702
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
703
|
+
<div class="fd-menu__content">
|
|
704
|
+
<span class="fd-menu__title">Sub-option 1b</span>
|
|
705
|
+
<span class="fd-menu__subtitle">Subtitle List Item</span>
|
|
706
|
+
</div>
|
|
707
|
+
<span class="fd-menu__addon-after fd-menu__addon-after--active"><i class="sap-icon--accept" role="presentation"></i></span>
|
|
708
|
+
</a>
|
|
709
|
+
</li>
|
|
710
|
+
<li class="fd-menu__item" role="presentation">
|
|
711
|
+
<a class="fd-menu__link is-hover" href="#" role="menuitem">
|
|
712
|
+
<span class="fd-menu__title">Sub-option 2 - Hover</span>
|
|
713
|
+
</a>
|
|
714
|
+
</li>
|
|
715
|
+
<li class="fd-menu__item" role="presentation">
|
|
716
|
+
<a class="fd-menu__link is-active" href="#" role="menuitem">
|
|
717
|
+
<span class="fd-menu__title">Sub-option 3 - Active</span>
|
|
718
|
+
</a>
|
|
719
|
+
</li>
|
|
720
|
+
<li class="fd-menu__item" role="presentation">
|
|
721
|
+
<a class="fd-menu__link is-selected" href="#" role="menuitem">
|
|
722
|
+
<span class="fd-menu__title">Sub-option 4 - Selected</span>
|
|
723
|
+
</a>
|
|
724
|
+
</li>
|
|
725
|
+
<li class="fd-menu__item" role="presentation">
|
|
726
|
+
<a class="fd-menu__link is-selected is-hover" href="#" role="menuitem">
|
|
727
|
+
<span class="fd-menu__title">Sub-option 5 - Selected Hover</span>
|
|
728
|
+
</a>
|
|
729
|
+
</li>
|
|
730
|
+
<li class="fd-menu__item" role="presentation">
|
|
731
|
+
<a class="fd-menu__link is-disabled" href="#" role="menuitem">
|
|
732
|
+
<span class="fd-menu__title">Sub-option 6 - Disabled with very very very very very very very very long text</span>
|
|
733
|
+
</a>
|
|
734
|
+
</li>
|
|
735
|
+
</ul>
|
|
736
|
+
</li>
|
|
737
|
+
<li class="fd-menu__item" role="presentation">
|
|
738
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
739
|
+
<span class="fd-menu__title">Option 3</span>
|
|
740
|
+
</a>
|
|
741
|
+
</li>
|
|
742
|
+
<li class="fd-menu__item" role="presentation">
|
|
743
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
744
|
+
<span class="fd-menu__title">Option 4</span>
|
|
745
|
+
</a>
|
|
746
|
+
</li>
|
|
747
|
+
</ul>
|
|
748
|
+
</nav>
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
### Extended Menu List Items (Segmented Button)
|
|
752
|
+
|
|
753
|
+
Each view of the segmented button gets its own menu item. The selected Button in the Segmented Button gets the Active Dot in front of the Menu List Item and is always separated with a separator. The 'segmented button menu items' cannot have an icon in front. Instead, the place is reserved for the Active Dot.
|
|
754
|
+
|
|
755
|
+
```html
|
|
756
|
+
<nav class="fd-menu fd-menu--icons">
|
|
757
|
+
<ul class="fd-menu__list" role="menu">
|
|
758
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
759
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
760
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--sort" role="presentation"></i></span>
|
|
761
|
+
<span class="fd-menu__title">Sort</span>
|
|
762
|
+
</a>
|
|
763
|
+
</li>
|
|
764
|
+
<li class="fd-menu__item" role="presentation">
|
|
765
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
766
|
+
<span class="fd-menu__addon-before">
|
|
767
|
+
<span class="fd-menu__active-dot" role="presentation"></span>
|
|
768
|
+
</span>
|
|
769
|
+
<span class="fd-menu__title">View 1</span>
|
|
770
|
+
</a>
|
|
771
|
+
</li>
|
|
772
|
+
<li class="fd-menu__item" role="presentation">
|
|
773
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
774
|
+
<span class="fd-menu__title">View 2</span>
|
|
775
|
+
</a>
|
|
776
|
+
</li>
|
|
777
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
778
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
779
|
+
<span class="fd-menu__title">View 3</span>
|
|
780
|
+
</a>
|
|
781
|
+
</li>
|
|
782
|
+
<li class="fd-menu__item" role="presentation">
|
|
783
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
784
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--action-settings" role="presentation"></i></span>
|
|
785
|
+
<span class="fd-menu__title">Settings</span>
|
|
786
|
+
</a>
|
|
787
|
+
</li>
|
|
788
|
+
</ul>
|
|
789
|
+
</nav>
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
### Extended Menu List Items (Toggle Button)
|
|
793
|
+
|
|
794
|
+
The toggle button gets “transformed” into a menu item which can be toggled and untoggled. If the toggle button is toggled, then a checkmark appears in front of the text (on position of an icon). If It's not toggled, then the space is empty. It is not possible to show an icon for the toggle button in the menu. This spot is reserved for the checkmark.
|
|
795
|
+
|
|
796
|
+
```html
|
|
797
|
+
<nav class="fd-menu fd-menu--icons">
|
|
798
|
+
<ul class="fd-menu__list" role="menu">
|
|
799
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
800
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
801
|
+
<span class="fd-menu__title">Toggle Button (untoggled)</span>
|
|
802
|
+
</a>
|
|
803
|
+
</li>
|
|
804
|
+
<li class="fd-menu__item" role="presentation">
|
|
805
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
806
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--sort" role="presentation"></i></span>
|
|
807
|
+
<span class="fd-menu__title">View 1</span>
|
|
808
|
+
</a>
|
|
809
|
+
</li>
|
|
810
|
+
<li class="fd-menu__item" role="presentation">
|
|
811
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
812
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--action-settings" role="presentation"></i></span>
|
|
813
|
+
<span class="fd-menu__title">View 2</span>
|
|
814
|
+
</a>
|
|
815
|
+
</li>
|
|
816
|
+
</ul>
|
|
817
|
+
</nav>
|
|
818
|
+
|
|
819
|
+
<nav class="fd-menu fd-menu--icons">
|
|
820
|
+
<ul class="fd-menu__list" role="menu">
|
|
821
|
+
<li class="fd-menu__item has-separator" role="presentation">
|
|
822
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
823
|
+
<span class="fd-menu__addon-before">
|
|
824
|
+
<i class="sap-icon--accept fd-menu__checkmark" role="presentation"></i>
|
|
825
|
+
</span>
|
|
826
|
+
<span class="fd-menu__title">Toggle Button (toggled)</span>
|
|
827
|
+
</a>
|
|
828
|
+
</li>
|
|
829
|
+
<li class="fd-menu__item" role="presentation">
|
|
830
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
831
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--sort" role="presentation"></i></span>
|
|
832
|
+
<span class="fd-menu__title">View 1</span>
|
|
833
|
+
</a>
|
|
834
|
+
</li>
|
|
835
|
+
<li class="fd-menu__item" role="presentation">
|
|
836
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
837
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--action-settings" role="presentation"></i></span>
|
|
838
|
+
<span class="fd-menu__title">View 2</span>
|
|
839
|
+
</a>
|
|
840
|
+
</li>
|
|
841
|
+
</ul>
|
|
842
|
+
</nav>
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
### Extended Menu List Items (Input)
|
|
846
|
+
|
|
847
|
+
An Input field can be placed in a menu item. When an input is placed in a menu item, the text serves as a label. When there is enough space on desktop-based devices, then the input field is positioned next to the text. If there's not enough space, it moves to the next line. The input field is always positioned below the label on mobile devices.
|
|
848
|
+
|
|
849
|
+
```html
|
|
850
|
+
<nav class="fd-menu fd-menu--icons">
|
|
851
|
+
<ul class="fd-menu__list" role="menu">
|
|
852
|
+
<li class="fd-menu__item" role="presentation">
|
|
853
|
+
<div class="fd-menu__link" role="presentation">
|
|
854
|
+
<input class="fd-input fd-menu__input" type="text" id="input-1" placeholder="Field placeholder text">
|
|
855
|
+
</li>
|
|
856
|
+
<li class="fd-menu__item" role="presentation">
|
|
857
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
858
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--map" role="presentation"></i></span>
|
|
859
|
+
<span class="fd-menu__title">Add New Pin</span>
|
|
860
|
+
</a>
|
|
861
|
+
</li>
|
|
862
|
+
<li class="fd-menu__item" role="presentation">
|
|
863
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
864
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--image-viewer" role="presentation"></i></span>
|
|
865
|
+
<span class="fd-menu__title">View 360</span>
|
|
866
|
+
</a>
|
|
867
|
+
</li>
|
|
868
|
+
</ul>
|
|
869
|
+
</nav>
|
|
870
|
+
|
|
871
|
+
<nav class="fd-menu fd-menu--icons">
|
|
872
|
+
<ul class="fd-menu__list" role="menu">
|
|
873
|
+
<li class="fd-menu__item" role="presentation">
|
|
874
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
875
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--map" role="presentation"></i></span>
|
|
876
|
+
<span class="fd-menu__title">Add New Pin</span>
|
|
877
|
+
</a>
|
|
878
|
+
</li>
|
|
879
|
+
<li class="fd-menu__item" role="presentation">
|
|
880
|
+
<a class="fd-menu__link" href="#" role="menuitem">
|
|
881
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--image-viewer" role="presentation"></i></span>
|
|
882
|
+
<span class="fd-menu__title">View 360</span>
|
|
883
|
+
</a>
|
|
884
|
+
</li>
|
|
885
|
+
<li class="fd-menu__item" role="presentation">
|
|
886
|
+
<div class="fd-menu__link" role="presentation">
|
|
887
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--filter" role="presentation"></i></span>
|
|
888
|
+
<span class="fd-menu__title">Filter</span>
|
|
889
|
+
<input class="fd-input fd-menu__input" type="text" id="input-1" placeholder="Field placeholder text">
|
|
890
|
+
</div>
|
|
891
|
+
</li>
|
|
892
|
+
</ul>
|
|
893
|
+
</nav>
|
|
894
|
+
</div>
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
### Extended Menu List Items (Buttons as Menu Items)
|
|
898
|
+
|
|
899
|
+
The buttons are “transformed” into menu items. It is optional to add an icon and those could be replaced by product teams.
|
|
900
|
+
|
|
901
|
+
```html
|
|
902
|
+
<nav class="fd-menu fd-menu--icons">
|
|
903
|
+
<ul class="fd-menu__list" role="menu">
|
|
904
|
+
<li class="fd-menu__item" role="presentation">
|
|
905
|
+
<button class="fd-menu__link" role="menuitem">
|
|
906
|
+
<span class="fd-menu__title">Sort</span>
|
|
907
|
+
</button>
|
|
908
|
+
</li>
|
|
909
|
+
<li class="fd-menu__item" role="presentation">
|
|
910
|
+
<button class="fd-menu__link" role="menuitem">
|
|
911
|
+
<span class="fd-menu__title">Edit</span>
|
|
912
|
+
</button>
|
|
913
|
+
</li>
|
|
914
|
+
<li class="fd-menu__item" role="presentation">
|
|
915
|
+
<button class="fd-menu__link" role="menuitem">
|
|
916
|
+
<span class="fd-menu__title">Save</span>
|
|
917
|
+
</button>
|
|
918
|
+
</li>
|
|
919
|
+
<li class="fd-menu__item" role="presentation">
|
|
920
|
+
<button class="fd-menu__link" role="menuitem">
|
|
921
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--message-error" role="presentation"></i></span>
|
|
922
|
+
<span class="fd-menu__title">Reject</span>
|
|
923
|
+
</button>
|
|
924
|
+
</li>
|
|
925
|
+
<li class="fd-menu__item" role="presentation">
|
|
926
|
+
<button class="fd-menu__link" role="menuitem">
|
|
927
|
+
<span class="fd-menu__addon-before"><i class="sap-icon--message-success" role="presentation"></i></span>
|
|
928
|
+
<span class="fd-menu__title">Accept</span>
|
|
929
|
+
</button>
|
|
930
|
+
</li>
|
|
931
|
+
</ul>
|
|
932
|
+
</nav>
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
## Accessibility
|
|
936
|
+
|
|
937
|
+
- Use semantic HTML elements where appropriate
|
|
938
|
+
- Include proper ARIA attributes for interactive elements
|
|
939
|
+
- Ensure keyboard navigation support
|
|
940
|
+
- Provide adequate color contrast
|
|
941
|
+
|
|
942
|
+
## Source
|
|
943
|
+
|
|
944
|
+
This documentation was automatically generated from: `packages/styles/stories/Components/menu/menu.stories.js`
|
|
945
|
+
|
|
946
|
+
For the latest updates and interactive examples, see [Storybook](https://sap.github.io/fundamental-styles/).
|