@@ -14,7 +14,7 @@ represent an input, attribute, or action. Chips help people enter information,
1414make selections, filter content, or trigger actions. There are four variants of
1515chips.
1616
17- ![ Examples of the four different chip types] ( assets/chips/chip_types .png )
17+ ![ Examples of the four different chip types] ( assets/chips/chip-types .png )
1818
19191 . Assist chip
20202 . Filter chip
3434
3535<summary ><h4 >Assist</h4 ></summary >
3636
37- ![ Anatomy of assist chip] ( assets/chips/assist_anatomy .png )
37+ ![ Anatomy of assist chip] ( assets/chips/assist-anatomy .png )
3838
39391 . Container
40402 . Label text
4545
4646<summary ><h4 >Filter</h4 ></summary >
4747
48- ![ Anatomy of a filter chip] ( assets/chips/filter_anatomy .png )
48+ ![ Anatomy of a filter chip] ( assets/chips/filter-anatomy .png )
4949
50501 . Container
51512 . Label text
5757
5858<summary ><h4 >Input</h4 ></summary >
5959
60- ![ Anatomy of a input chip] ( assets/chips/input_anatomy .png )
60+ ![ Anatomy of a input chip] ( assets/chips/input-anatomy .png )
6161
62621 . Container
63632 . Label text
6969
7070<summary ><h4 >Suggestion</h4 ></summary >
7171
72- ![ Anatomy of a suggestion chip] ( assets/chips/suggestion_anatomy .png )
72+ ![ Anatomy of a suggestion chip] ( assets/chips/suggestion-anatomy .png )
7373
74741 . Container
75752 . Label text
@@ -184,12 +184,12 @@ Assist chips represent smart or automated actions that can span multiple apps,
184184such as opening a calendar event from the home screen. Assist chips function as
185185though the user asked an assistant to complete the action.
186186
187- #### Assist chip example
187+ #### Default
188188
189189The following example shows an activated assist chip.
190190
191191![ "A selected action chip with its corresponding action, a visible popup textbox
192- stating the chip has been activated."] ( assets/chips/chips_selected_assist .png )
192+ stating the chip has been activated."] ( assets/chips/chips-selected-assist .png )
193193
194194In the layout:
195195
@@ -203,14 +203,31 @@ In the layout:
203203
204204<com .google.android.material.chip.Chip
205205 android : id =" @+id/chip_1"
206- style =" @style/Widget.Material3.Chip.Assist"
207206 android : layout_width =" wrap_content"
208207 android : layout_height =" wrap_content"
209208 android : text =" @string/chip_text_1"
210209 app : chipIcon =" @drawable/circle_1"
211210 app : ensureMinTouchTargetSize =" true" />
212211```
213212
213+ #### Elevated
214+
215+ ![ "Assist elevated chip in light theme"] ( assets/chips/chip-assist-elevated-light-theme.png )
216+
217+ ![ "Assist elevated chip in dark theme"] ( assets/chips/chip-assist-elevated-dark-theme.png )
218+
219+ Assist chips also come in an ` Elevated ` style variant, to be used when placed
220+ against a background that needs protection, such as an image.
221+
222+ ``` xml
223+ <com .google.android.material.chip.Chip
224+ style =" @style/Widget.Material3.Chip.Assist.Elevated"
225+ android : layout_width =" wrap_content"
226+ android : layout_height =" wrap_content"
227+ android : text =" @string/chip_text"
228+ app : chipIcon =" @drawable/ic_action_24" />
229+ ```
230+
214231</details >
215232
216233<details >
@@ -222,12 +239,12 @@ Filter chips use tags or descriptive words to filter content.
222239Filter chips clearly delineate and display options in a compact area. They are a
223240good alternative to toggle buttons or checkboxes.
224241
225- #### Filter chip example
242+ #### Default
226243
227244The following example shows filter chips.
228245
229246![ "6 white "Filter" chips spread across 2 lines: "Filters" 1 and 3 selected and
230- are light purple and include checkmarks."] ( assets/chips/chips_filter .png )
247+ are light purple and include checkmarks."] ( assets/chips/chips-filter .png )
231248
232249In the layout:
233250
@@ -271,6 +288,23 @@ In the layout:
271288</com .google.android.material.chip.ChipGroup>
272289```
273290
291+ #### Elevated
292+
293+ ![ "Filter elevated chip in light theme"] ( assets/chips/chip-filter-elevated-light-theme.png )
294+
295+ ![ "Filter elevated chip in dark theme"] ( assets/chips/chip-filter-elevated-dark-theme.png )
296+
297+ Filter chips also come in an ` Elevated ` style variant, to be used when placed
298+ against a background that needs protection, such as an image.
299+
300+ ``` xml
301+ <com .google.android.material.chip.Chip
302+ style =" @style/Widget.Material3.Chip.Filter.Elevated"
303+ android : layout_width =" wrap_content"
304+ android : layout_height =" wrap_content"
305+ android : text =" @string/chip_text" />
306+ ```
307+
274308</details >
275309
276310<details >
@@ -285,7 +319,7 @@ that input by converting text into chips.
285319
286320The following example shows input chips.
287321
288- ![ "Input chips with texts Input 1 to 6."] ( assets/chips/chips_input .png )
322+ ![ "Input chips with texts Input 1 to 6."] ( assets/chips/chips-input .png )
289323
290324In the layout:
291325
@@ -294,19 +328,19 @@ In the layout:
294328 ...>
295329 <com .google.android.material.chip.Chip
296330 android : id =" @+id/chip_1"
297- style =" @style/Widget.Material3.Chip.Input "
331+ style =" ?attr/chipStandaloneStyle "
298332 android : layout_width =" wrap_content"
299333 android : layout_height =" wrap_content"
300334 android : text =" @string/text_input_1" />
301335
302336 <com .google.android.material.chip.Chip
303337 ...
304- style =" @style/Widget.Material3.Chip.Input "
338+ style =" ?attr/chipStandaloneStyle "
305339 android : text =" @string/text_input_2" />
306340
307341 <com .google.android.material.chip.Chip
308342 ...
309- style =" @style/Widget.Material3.Chip.Input "
343+ style =" ?attr/chipStandaloneStyle "
310344 android : text =" @string/text_input_3" />
311345
312346</com .google.android.material.chip.ChipGroup>
@@ -321,14 +355,14 @@ In the layout:
321355Suggestion chips help narrow a user’s intent by presenting dynamically generated
322356suggestions, such as offering possible responses or providing search filters.
323357
324- #### Suggestion chip example
325-
326- The following example shows suggestion chips.
358+ The following example shows suggestion chips in default and elevated styles.
327359
328360![ "3 suggestion chips, where suggestion 1 is unselected with a solid border and
329361white background, suggestion 2 is selected with no border and a light purple
330362background, and suggestion 3 is an unselected elevated suggestion with no border
331- and a light grey background."] ( assets/chips/chips_suggestion.png )
363+ and a light grey background."] ( assets/chips/chips-suggestion.png )
364+
365+ #### Default
332366
333367In the layout:
334368
@@ -344,14 +378,26 @@ In the layout:
344378 ...
345379 style =" @style/Widget.Material3.Chip.Suggestion"
346380 android : text =" @string/chip_text_2" />
347- <com .google.android.material.chip.Chip
348- ...
349- style =" @style/Widget.Material3.Chip.Suggestion.Elevated"
350- android : text =" @string/chip_text_3" />
351381
352382</com .google.android.material.chip.ChipGroup>
353383```
354384
385+ #### Elevated
386+
387+ Suggestion chips also come in an ` Elevated ` style variant. These chips
388+ should be used when placed against a background that needs protection, such
389+ as an image.
390+
391+ ``` xml
392+ <com .google.android.material.chip.Chip
393+ style =" @style/Widget.Material3.Chip.Suggestion.Elevated"
394+ android : layout_width =" wrap_content"
395+ android : layout_height =" wrap_content"
396+ android : text =" @string/chip_text_3" />
397+ ```
398+
399+ ** Note:** Suggestion chips are usually placed within a ` ChipGroup ` .
400+
355401</details >
356402
357403## Code implementation
@@ -448,7 +494,7 @@ opposed to a `ViewGroup` such as `RecyclerView`. A `ChipGroup` contains a set of
448494A ` ChipGroup ` rearranges chips across multiple rows by default.
449495
450496![ "6 white "Filter" chips spread across 2 lines: "Filters" 1 and 3 selected and
451- are light purple and include checkmarks."] ( assets/chips/chips_filter .png )
497+ are light purple and include checkmarks."] ( assets/chips/chips-filter .png )
452498
453499``` xml
454500<com .google.android.material.chip.ChipGroup
@@ -466,7 +512,7 @@ A `ChipGroup` can also constrain its chips to a single row using the
466512` ChipGroup ` with a ` HorizontalScrollView ` .
467513
468514![ "Single line of white chips: chips 1, 2, and 3 are fully visible, chip 4 is
469- partly visible"] ( assets/chips/chips_singleline .png )
515+ partly visible"] ( assets/chips/chips-singleline .png )
470516
471517``` xml
472518<HorizontalScrollView
@@ -497,7 +543,7 @@ for lower amounts.
497543The following image shows a group of chips with
498544` app:chipSpacingHorizontal="42dp" ` .
499545
500- ![ "6 white chips in 2 rows with 42dp horizontal spacing"] ( assets/chips/chips_spacing .png )
546+ ![ "6 white chips in 2 rows with 42dp horizontal spacing"] ( assets/chips/chips-spacing .png )
501547
502548</details >
503549
@@ -563,7 +609,7 @@ For example, consider an editable e-mail address field that converts addresses
563609to chips as they are typed and validated. We can combine ` ChipDrawable ` with
564610spans to add a chip to an ` EditText ` :
565611
566- ![ "Standalone chip inside a text field"] ( assets/chips/chips_standalone .png )
612+ ![ "Standalone chip inside a text field"] ( assets/chips/chips-standalone .png )
567613
568614``` kt
569615chip.setBounds(0 , 0 , chip.intrinsicWidth, chip.intrinsicHeight)
@@ -594,7 +640,7 @@ API and source code:
594640
595641The following example shows chips with Material theming.
596642
597- ![ "3 chips with brown text and icons, white fill, and pink outlines"] ( assets/chips/chips_theming .png )
643+ ![ "3 chips with brown text and icons, white fill, and pink outlines"] ( assets/chips/chips-theming .png )
598644
599645##### Implementing chip theming
600646
0 commit comments