Skip to content

Commit ec8bed6

Browse files
topherfangiojelbourn
authored andcommitted
docs(chips): Update overview with more info. (#2341)
Update the Chips overview with additional information and context. - Add section regarding disabled chips - Note `(select)` and `(deselect)` outputs - Add hint about `<md-basic-chip>` - Fix a few typos
1 parent ed5479c commit ec8bed6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/lib/chips/OVERVIEW.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
`<md-chip-list>` displays a list of values as individual chips.
1+
`<md-chip-list>` displays a list of values as individual, keyboard accessible, chips.
22

33
<!-- example(chips-overview) -->
44

@@ -16,15 +16,25 @@ _Note: chips are still early in their development and more features are being ac
1616
By default, `<md-chip>` has Material Design styles applied. For a chip with no styles applied,
1717
use `<md-basic-chip>`. You can then customize the chip appearance by adding your own CSS.
1818

19+
_Hint: `<md-basic-chip>` receives the `md-basic-chip` CSS class in addition to the `md-chip` class._
20+
1921
### Selection
2022
Chips can be selected via the `selected` property. Selection can be disabled by setting
21-
`selectable` to `false` on the `<md-chip-list>`.
23+
`selectable` to `false` on the `<md-chip-list>`.
24+
25+
Selection emits the `(select)` output while deselecting emits the `(deselect)` output. Both outputs
26+
receive a ChipEvent object with a structure of `{ chip: alteredChip }`.
27+
28+
### Disabled chips
29+
Individual chips may be disabled by applying the `disabled` attribute to the chip. When disabled,
30+
chips are neither selectable nor focusable. Currently, disabled chips receive no special styling.
2231

23-
### Keyboard interation
24-
Users can move through the chips using the arrow keys and select them with the space.
32+
### Keyboard interaction
33+
Users can move through the chips using the arrow keys and select/deselect them with the space. Chips
34+
also gain focus when clicked, ensuring keyboard navigation starts at the appropriate chip.
2535

2636

2737
### Theming
28-
The color of an `<md-chip>` can be changed by using the `color` property. By default, chips
38+
The selected color of an `<md-chip>` can be changed by using the `color` property. By default, chips
2939
use a neutral background color based on the current theme (light or dark). This can be changed to
3040
`'primary'`, `'accent'`, or `'warn'`.

0 commit comments

Comments
 (0)