Skip to content

Commit 76185ff

Browse files
committed
fixup! fix(cdk/menu): update docs to reflect current implementation and add correct role for triggers
1 parent f95a721 commit 76185ff

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

src/cdk/menu/menu.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,40 @@ The directives in `@angular/cdk/menu` set the appropriate roles on their host el
1919
| CdkMenuItemCheckbox | menuitemcheckbox |
2020
| CdkMenuTrigger | button |
2121

22+
### CSS Styles and Classes
23+
24+
The `@angular/cdk/menu` is designed to be highly customizable to your needs. It therefore does not
25+
make any assumptions about how elements should be styled. You are expected to apply any required
26+
CSS styles, but the directives do apply CSS classes to make it easier for you to add custom styles.
27+
The available CSS classes are listed below, by directive.
28+
29+
#### `cdkMenu`
30+
31+
`cdk-menu`
32+
: Always applied
33+
`cdk-menu-inline`
34+
: Applied if the menu is an [inline menu](#menu-content)
35+
36+
#### `cdkMenuBar`
37+
38+
`cdk-menu-bar`
39+
: Always applied
40+
41+
#### `cdkMenuGroup`
42+
43+
`cdk-menu-group`
44+
: Always applied
45+
46+
#### `cdkMenuItem`
47+
48+
`cdk-menu-item`
49+
: Always applied
50+
51+
#### `cdkMenuTriggerFor`
52+
53+
`cdk-menu-trigger`
54+
: Always applied
55+
2256
### Getting started
2357

2458
Import the `CdkMenuModule` into the `NgModule` in which you want to create menus. You can then apply
@@ -69,7 +103,7 @@ Note that Angular CDK provides no styles; you must add styles as part of buildin
69103

70104
### Inline Menus
71105

72-
An _inline menu_ is a menu that lives directly on the page rather than a pop-up associated with a
106+
An _inline menu_ is a menu that lives directly on the page rather than in a pop-up associated with a
73107
trigger. You can use an inline menu when you want a persistent menu interaction on a page. Menu
74108
items within an inline menus are logically grouped together, and you can navigate through them
75109
using your keyboard. You can create an inline menu by adding the `cdkMenu` directive to the element

0 commit comments

Comments
 (0)