diff --git a/src/lib/chips/OVERVIEW.md b/src/lib/chips/OVERVIEW.md index 33caeb0c989..7159fdc9f36 100644 --- a/src/lib/chips/OVERVIEW.md +++ b/src/lib/chips/OVERVIEW.md @@ -1,4 +1,4 @@ -`` displays a list of values as individual chips. +`` displays a list of values as individual, keyboard accessible, chips. @@ -16,15 +16,25 @@ _Note: chips are still early in their development and more features are being ac By default, `` has Material Design styles applied. For a chip with no styles applied, use ``. You can then customize the chip appearance by adding your own CSS. +_Hint: `` receives the `md-basic-chip` CSS class in addition to the `md-chip` class._ + ### Selection Chips can be selected via the `selected` property. Selection can be disabled by setting -`selectable` to `false` on the ``. +`selectable` to `false` on the ``. -### Keyboard interation -Users can move through the chips using the arrow keys and select them with the space. +Selection emits the `(select)` output while deselecting emits the `(deselect)` output. Both outputs +receive a ChipEvent object with a structure of `{ chip: alteredChip }`. + +### Disabled chips +Individual chips may be disabled by applying the `disabled` attribute to the chip. When disabled, +chips are neither selectable nor focusable. Currently, disabled chips receive no special styling. + +### Keyboard interaction +Users can move through the chips using the arrow keys and select/deselect them with the space. Chips +also gain focus when clicked, ensuring keyboard navigation starts at the appropriate chip. ### Theming -The color of an `` can be changed by using the `color` property. By default, chips +The selected color of an `` can be changed by using the `color` property. By default, chips use a neutral background color based on the current theme (light or dark). This can be changed to `'primary'`, `'accent'`, or `'warn'`.