You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/angular-docs/src/routes/components+/menu+/_menu.mdx
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,21 +22,27 @@ import {Menu} from "@qualcomm-ui/react/menu"
22
22
### Item Customization
23
23
24
24
::: terms
25
-
hotkeys
26
-
keyboard shortcuts
27
-
action list
28
-
overflow menu
25
+
hotkeys, keyboard shortcuts, action list, overflow menu
29
26
:::
30
27
31
28
Compose the menu to include icons and commands.
32
29
33
30
<QdsDemoname="MenuItemCustomizationDemo" />
34
31
32
+
### Menu Button
33
+
34
+
::: terms
35
+
menu trigger, dropdown button, icon menu button
36
+
:::
37
+
38
+
Use [`q-menu-button`](./#q-menu-button) for a labeled trigger and [`q-menu-icon-button`](./#q-menu-icon-button) for an icon-only trigger. Both automatically render a chevron indicator. Always provide an `aria-label` on `q-menu-icon-button` to give assistive technologies an accessible name. Control the menu position with [positioning.placement](./#positioning).
39
+
40
+
<QdsDemoname="MenuButtonDemo" />
41
+
35
42
### Context Menu
36
43
37
44
::: terms
38
-
oncontextmenu
39
-
right-click menu
45
+
oncontextmenu, right-click menu
40
46
:::
41
47
42
48
Demonstrates how to trigger a menu on right-click or other context events.
@@ -46,9 +52,7 @@ Demonstrates how to trigger a menu on right-click or other context events.
46
52
### Nested Menus
47
53
48
54
::: terms
49
-
submenu
50
-
cascading
51
-
hierarchical
55
+
submenu, cascading, hierarchical
52
56
:::
53
57
54
58
Compose nested menus by nesting `<Menu.Root>` components inside each other.
@@ -58,9 +62,7 @@ Compose nested menus by nesting `<Menu.Root>` components inside each other.
58
62
### Links
59
63
60
64
::: terms
61
-
anchor
62
-
navigation
63
-
navigation menu
65
+
anchor, navigation, navigation menu
64
66
:::
65
67
66
68
Menu items can be links.
@@ -82,8 +84,7 @@ There are three item types, each corresponding to one of the three types of aria
82
84
#### Checkbox Items
83
85
84
86
::: terms
85
-
multi-select
86
-
toggle
87
+
multi-select, toggle
87
88
:::
88
89
89
90
Use checkbox items when you need options that are individually selectable.
@@ -103,8 +104,7 @@ Checkbox item state is controlled individually on each item. Use the `useCheckbo
103
104
#### Radio Group
104
105
105
106
::: terms
106
-
single-select
107
-
exclusive selection
107
+
single-select, exclusive selection
108
108
:::
109
109
110
110
Radio items are grouped such that only one can be selected at a time.
@@ -114,8 +114,7 @@ Radio items are grouped such that only one can be selected at a time.
114
114
#### Radio Group State
115
115
116
116
::: terms
117
-
controlled radio
118
-
radio selection
117
+
controlled radio, radio selection
119
118
:::
120
119
121
120
Radio item state can be controlled via the [value](./#value) property on the parent `menu-radio-item-group` element.
@@ -125,11 +124,10 @@ Radio item state can be controlled via the [value](./#value) property on the par
125
124
### Controlled State
126
125
127
126
::: terms
128
-
signal
129
-
two-way binding
127
+
signal, two-way binding
130
128
:::
131
129
132
-
The menu's visibility can be controlled via the [open](./#open), [openChanged](./#openChanged), and [defaultOpen](./#defaultOpen) properties.
130
+
The menu's visibility can be controlled via the [`open`](./#open), [`openChanged`](./#openchanged), and [`defaultOpen`](./#default-open) properties.
133
131
134
132
- Use `open` to explicitly set whether the menu is open (controlled mode).
135
133
- Use `openChanged` to be notified when the menu requests to open or close.
@@ -142,8 +140,7 @@ In controlled mode, the `open` prop should be updated in response to `openChange
142
140
### Placement
143
141
144
142
::: terms
145
-
position
146
-
popover placement
143
+
position, popover placement
147
144
:::
148
145
149
146
Configure the menu's placement using the [positioning.placement](./#positioning) prop.
@@ -163,9 +160,7 @@ Use the [positioning.anchorPoint](./#positioning) prop to control the anchor poi
163
160
### Avatar
164
161
165
162
::: terms
166
-
profile menu
167
-
user menu
168
-
account dropdown
163
+
profile menu, user menu, account dropdown
169
164
:::
170
165
171
166
Here's an example that composes the `Menu` with the [Avatar](/components/avatar) component to display a user account menu.
@@ -175,20 +170,17 @@ Here's an example that composes the `Menu` with the [Avatar](/components/avatar)
175
170
### Within Dialog
176
171
177
172
::: terms
178
-
modal
179
-
overlay composition
173
+
modal, overlay composition
180
174
:::
181
175
182
-
When using the `Menu` inside a `Dialog`, don't render the `q-menu-positioner` within a portal element.
176
+
When using the `Menu` inside a [Dialog](/components/dialog), don't render the `q-menu-positioner` within a portal element.
183
177
184
178
<QdsDemoname="MenuWithinDialogDemo" />
185
179
186
180
### Hide When Detached
187
181
188
182
::: terms
189
-
auto-hide
190
-
scroll behavior
191
-
overflow
183
+
auto-hide, scroll behavior, overflow
192
184
:::
193
185
194
186
Use the [positioning.hideWhenDetached](./#positioning) prop to hide the menu when it's detached from the trigger.
@@ -201,6 +193,14 @@ Use the [positioning.hideWhenDetached](./#positioning) prop to hide the menu whe
0 commit comments