Skip to content

Search ​

Search lets people enter a keyword or phrase to get relevant information. Search bars can display suggested keywords or phrases as the user types.

Overview · Specs · Guidelines · Accessibility

Variants ​

When a person executes a search, results appear in a list below the search bar

VariantM3M3 Expressive
SearchAvailableAvailable

Configurations ​

Style ​

Search comes in two styles:

  • Contained: Has an expressive look and feel. It uses a filled container to separate a search bar from a list of suggestions or results
  • Divided (baseline): Doesn’t have the latest visual style, motion, or flexibility

An email inbox search bar in a contained style.

The contained style has a persistent, filled container, expressive motion, and rounded shape

An email inbox search bar in a divided style.

The divided (baseline) style uses a divider to separate the search bar from suggestions and results

Layout ​

Search suggestions and results appear in customizable lists, with two layout options: full-screen and docked. More on search layouts

Full-screen search results with a search bar in the contained style.

Full-screen layout in the contained style

Docked search results with a search bar in the contained style.

Docked layout in the contained style

Full-screen search results with a search bar in the divided style.

Full-screen layout in the divided style

Docked search results with a search bar in the divided style.

Docked layout in the divided style

CategoryConfigurationM3M3 Expressive
StyleContained--Available
DividedAvailableNot recommended. Use contained.
LayoutDocked, full-screenAvailableAvailable

Tokens & specs ​

Use the table's menu to select a token set. The search bar set only contains tokens for the unfocused search bar. The search view set contains all other tokens when interacting with search, including all styles and layouts. Learn more about design tokens

Design tokens

Token table

Machine-readable relationship table

Search tokens · 2 token sets · 85 tokens · live token table · DSDB TOKEN_TABLE.07341534518f78d0

  • Default context: Theme: Light · Platform: Android · Audience: 3P · Font: Static · Contrast: Default · iOS dark theme elevation: None · iOS weight setting: Default
  • Not configurable here (group default used): Motion scheme: Standard · Language height: Small
  • Other contexts: Theme: Dark · Platform: Web, Compose · Contrast: Medium contrast, High contrast. "Other contexts" lists values that differ from the default when only that one context changes.
  • Reference chain: aliases from the token to its source value (token → alias → … → value). "—" means the token holds a literal value.

Search - Bar · md.comp.search-bar · 49 tokens

For baseline search bar and expressive search.

GroupTokenTypeReference chainResolved valueOther contexts
Layout and Text › Baselinemd.comp.search-bar.trailing-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Baselinemd.comp.search-bar.leading-icon.leading-icon-label-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Baselinemd.comp.search-bar.trailing-icon.label-trailing-icon-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Baselinemd.comp.search-bar.leading-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Common tokensmd.comp.search-bar.container.heightLength—56dp—
Layout and Text › Common tokensmd.comp.search-bar.container.shapeShapemd.sys.shape.corner.fullCircular (fully rounded)—
Layout and Text › Common tokensmd.comp.search-bar.avatar.sizeLength—30dp—
Layout and Text › Common tokensmd.comp.search-bar.avatar.shapeShapemd.sys.shape.corner.fullCircular (fully rounded)—
Layout and Text › Common tokensmd.comp.search-bar.icon.sizeLength—24dp—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.typeTypographycomposite
font names: md.comp.search-bar.supporting-text.font → md.sys.typescale.body-large.font → md.ref.typeface.plain
font weight: md.comp.search-bar.supporting-text.weight → md.sys.typescale.body-large.weight → md.ref.typeface.weight-regular
font size: md.comp.search-bar.supporting-text.size → md.sys.typescale.body-large.size
line height: md.comp.search-bar.supporting-text.line-height → md.sys.typescale.body-large.line-height
font tracking: md.comp.search-bar.supporting-text.tracking → md.sys.typescale.body-large.tracking
Roboto · weight 400 · size 16pt · line height 24pt · tracking 0.5pt—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.fontFont namesmd.sys.typescale.body-large.font → md.ref.typeface.plainRoboto—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.line-heightLine heightmd.sys.typescale.body-large.line-height24pt—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.sizeFont sizemd.sys.typescale.body-large.size16pt—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.weightFont weightmd.sys.typescale.body-large.weight → md.ref.typeface.weight-regular400—
Layout and Text › Common tokensmd.comp.search-bar.supporting-text.trackingFont trackingmd.sys.typescale.body-large.tracking0.5pt—
Layout and Text › Common tokensmd.comp.search-bar.input-text.typeTypographycomposite
font names: md.comp.search-bar.input-text.font → md.sys.typescale.body-large.font → md.ref.typeface.plain
font weight: md.comp.search-bar.input-text.weight → md.sys.typescale.body-large.weight → md.ref.typeface.weight-regular
font size: md.comp.search-bar.input-text.size → md.sys.typescale.body-large.size
line height: md.comp.search-bar.input-text.line-height → md.sys.typescale.body-large.line-height
font tracking: md.comp.search-bar.input-text.tracking → md.sys.typescale.body-large.tracking
Roboto · weight 400 · size 16pt · line height 24pt · tracking 0.5pt—
Layout and Text › Common tokensmd.comp.search-bar.input-text.fontFont namesmd.sys.typescale.body-large.font → md.ref.typeface.plainRoboto—
Layout and Text › Common tokensmd.comp.search-bar.input-text.line-heightLine heightmd.sys.typescale.body-large.line-height24pt—
Layout and Text › Common tokensmd.comp.search-bar.input-text.sizeFont sizemd.sys.typescale.body-large.size16pt—
Layout and Text › Common tokensmd.comp.search-bar.input-text.weightFont weightmd.sys.typescale.body-large.weight → md.ref.typeface.weight-regular400—
Layout and Text › Common tokensmd.comp.search-bar.input-text.trackingFont trackingmd.sys.typescale.body-large.tracking0.5pt—
Layout and Text › Common tokensmd.comp.search-bar.container.surface-tint-layer.color (deprecated)Colormd.sys.color.surface-tint → md.sys.color.primary → md.ref.palette.primary40#6750A4Dark: #D0BCFF via md.ref.palette.primary80
Medium contrast: #4F378B via md.ref.palette.primary30
High contrast: #381E72 via md.ref.palette.primary20
Layout and Text › Contained (expressive)md.comp.search-bar.contained.trailing-marginLengthmd.sys.measurement.space30024dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.motion.springCustom compositemd.sys.motion.spring.fast.spatial → composite
+2 variation axes
damping 0.9 · stiffness 1400—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.leading-spaceLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.trailing-spaceLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.no-actions.leading-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.no-actions.trailing-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.icon-label.gapLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.avatar.target-sizeLength—48dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.trailing-actions.gapLengthmd.sys.measurement.space00dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.trailing-actions.leading-spaceLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.trailing-actions.trailing-spaceLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-bar.contained.leading-marginLengthmd.sys.measurement.space30024dp—
Color › Hoveredmd.comp.search-bar.hover.state-layer.opacityOpacitymd.sys.state.hover.state-layer-opacity0.08—
Color › Hoveredmd.comp.search-bar.hover.supporting-text.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Color › Hoveredmd.comp.search-bar.hover.state-layer.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Color › Enabledmd.comp.search-bar.container.colorColormd.sys.color.surface-container-high → md.ref.palette.neutral92#ECE6F0Dark: #2B2930 via md.ref.palette.neutral17
Color › Enabledmd.comp.search-bar.container.elevationElevationmd.sys.elevation.level36dp—
Color › Enabledmd.comp.search-bar.leading-icon.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Color › Enabledmd.comp.search-bar.trailing-icon.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Color › Enabledmd.comp.search-bar.supporting-text.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Color › Enabledmd.comp.search-bar.input-text.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Color › Pressedmd.comp.search-bar.pressed.state-layer.opacityOpacitymd.sys.state.pressed.state-layer-opacity0.1—
Color › Pressedmd.comp.search-bar.pressed.supporting-text.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Color › Pressedmd.comp.search-bar.pressed.state-layer.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Color › Focusedmd.comp.search-bar.focus.indicator.thicknessLengthmd.sys.state.focus-indicator.thickness3dp—
Color › Focusedmd.comp.search-bar.focus.indicator.outline.offsetLengthmd.sys.state.focus-indicator.outer-offset2dp—
Color › Focusedmd.comp.search-bar.focus.indicator.colorColormd.sys.color.secondary → md.ref.palette.secondary40#625B71Dark: #CCC2DC via md.ref.palette.secondary80
Medium contrast: #4A4458 via md.ref.palette.secondary30
High contrast: #332D41 via md.ref.palette.secondary20

Search - View · md.comp.search-view · 36 tokens

For baseline search view and expressive search when activated.

GroupTokenTypeReference chainResolved valueOther contexts
Colormd.comp.search-view.contained.background.colorColormd.sys.color.surface-container-low → md.ref.palette.neutral96#F7F2FADark: #1D1B20 via md.ref.palette.neutral10
Colormd.comp.search-view.container.elevationElevationmd.sys.elevation.level36dp—
Colormd.comp.search-view.header.supporting-text.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Colormd.comp.search-view.header.input-text.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Colormd.comp.search-view.header.leading-icon.colorColormd.sys.color.on-surface → md.ref.palette.neutral10#1D1B20Dark: #E6E0E9 via md.ref.palette.neutral90
Medium contrast: #000000 via md.ref.palette.neutral0
High contrast: #000000 via md.ref.palette.neutral0
Colormd.comp.search-view.header.trailing-icon.colorColormd.sys.color.on-surface-variant → md.ref.palette.neutral-variant30#49454FDark: #CAC4D0 via md.ref.palette.neutral-variant80
Medium contrast: #322F37 via md.ref.palette.neutral-variant20
High contrast: #000000 via md.ref.palette.neutral-variant0
Colormd.comp.search-view.divider.colorColormd.sys.color.outline → md.ref.palette.neutral-variant50#79747EDark: #938F99 via md.ref.palette.neutral-variant60
Medium contrast: #49454F via md.ref.palette.neutral-variant30
High contrast: #322F37 via md.ref.palette.neutral-variant20
Colormd.comp.search-view.container.colorColormd.sys.color.surface-container-high → md.ref.palette.neutral92#ECE6F0Dark: #2B2930 via md.ref.palette.neutral17
Layout and Text › Divided (baseline)md.comp.search-view.full-screen.header.container.heightLength—72dp—
Layout and Text › Divided (baseline)md.comp.search-view.docked.header.container.heightLength—56dp—
Layout and Text › Divided (baseline)md.comp.search-view.leading-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Divided (baseline)md.comp.search-view.trailing-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Divided (baseline)md.comp.search-view.leading-icon.leading-icon-label-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Divided (baseline)md.comp.search-view.trailing-icon.label-trailing-icon-spaceLengthmd.sys.measurement.space20016dp—
Layout and Text › Divided (baseline)md.comp.search-view.docked.container.shapeShapemd.sys.shape.corner.extra-largeRounded corners 28dp—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.typeTypographycomposite
font names: md.comp.search-view.header.supporting-text.font → md.sys.typescale.body-large.font → md.ref.typeface.plain
font weight: md.comp.search-view.header.supporting-text.weight → md.sys.typescale.body-large.weight → md.ref.typeface.weight-regular
font size: md.comp.search-view.header.supporting-text.size → md.sys.typescale.body-large.size
line height: md.comp.search-view.header.supporting-text.line-height → md.sys.typescale.body-large.line-height
font tracking: md.comp.search-view.header.supporting-text.tracking → md.sys.typescale.body-large.tracking
Roboto · weight 400 · size 16pt · line height 24pt · tracking 0.5pt—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.fontFont namesmd.sys.typescale.body-large.font → md.ref.typeface.plainRoboto—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.line-heightLine heightmd.sys.typescale.body-large.line-height24pt—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.sizeFont sizemd.sys.typescale.body-large.size16pt—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.weightFont weightmd.sys.typescale.body-large.weight → md.ref.typeface.weight-regular400—
Layout and Text › Common tokensmd.comp.search-view.header.supporting-text.trackingFont trackingmd.sys.typescale.body-large.tracking0.5pt—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.typeTypographycomposite
font names: md.comp.search-view.header.input-text.font → md.sys.typescale.body-large.font → md.ref.typeface.plain
font weight: md.comp.search-view.header.input-text.weight → md.sys.typescale.body-large.weight → md.ref.typeface.weight-regular
font size: md.comp.search-view.header.input-text.size → md.sys.typescale.body-large.size
line height: md.comp.search-view.header.input-text.line-height → md.sys.typescale.body-large.line-height
font tracking: md.comp.search-view.header.input-text.tracking → md.sys.typescale.body-large.tracking
Roboto · weight 400 · size 16pt · line height 24pt · tracking 0.5pt—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.fontFont namesmd.sys.typescale.body-large.font → md.ref.typeface.plainRoboto—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.line-heightLine heightmd.sys.typescale.body-large.line-height24pt—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.sizeFont sizemd.sys.typescale.body-large.size16pt—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.weightFont weightmd.sys.typescale.body-large.weight → md.ref.typeface.weight-regular400—
Layout and Text › Common tokensmd.comp.search-view.header.input-text.trackingFont trackingmd.sys.typescale.body-large.tracking0.5pt—
Layout and Text › Common tokensmd.comp.search-view.full-screen.container.shapeShapemd.sys.shape.corner.noneRounded corners 0dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.trailing-marginLengthmd.sys.measurement.space15012dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.docked.bar-results.gapLengthmd.sys.measurement.space252dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.docked.results.shapeShapemd.sys.shape.corner.mediumRounded corners 12dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.docked.bar.shapeShapemd.sys.shape.corner.fullCircular (fully rounded)—
Layout and Text › Contained (expressive)md.comp.search-view.contained.full-screen.bar.container.heightLength—56dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.icon-label.gapLengthmd.sys.measurement.space504dp—
Layout and Text › Contained (expressive)md.comp.search-view.contained.leading-marginLengthmd.sys.measurement.space15012dp—
Othermd.comp.search-view.container.surface-tint-layer.color (deprecated)Colormd.sys.color.surface-tint → md.sys.color.primary → md.ref.palette.primary40#6750A4Dark: #D0BCFF via md.ref.palette.primary80
Medium contrast: #4F378B via md.ref.palette.primary30
High contrast: #381E72 via md.ref.palette.primary20

Anatomy ​

Search includes a search bar and a container for suggestions and results. The container is empty by default. Use the list component to add content. In the divided (baseline) style, a divider separates the search bar and results.

6 elements of search.

  1. Search bar container
  2. Leading icon
  3. Supporting text
  4. Trailing icon and avatar (optional)
  5. Input text
  6. Container for search suggestions or results

Examples ​

  1. With avatar
  2. With one trailing icon button
  3. With two trailing icon buttons
  4. With trailing icon button and avatar

4 search bars with different trailing elements.

Color ​

Color values are implemented through design tokens. For designers, this means working with color values that correspond with tokens. In implementation, a color value will be a token that references a value.

Full-screen layout ​

6 full-screen search color roles in light and dark themes.

Full-screen search color roles used in light and dark themes:

  1. Surface container low
  2. On surface variant
  3. On surface variant
  4. Surface container high
  5. On surface variant
  6. On surface

Docked layout ​

6 docked search color roles in light and dark themes.

Docked search color roles used in light and dark themes:

  1. Surface container high
  2. On surface variant
  3. On surface variant
  4. Surface container high
  5. On surface variant
  6. On surface

States ​

States are visual representations used to communicate the status of a component or an interactive element. In focused search, individual elements maintain their own interaction states. Learn more about interaction states

4 search bar states in light and dark mode.

  1. Enabled
  2. Hovered
  3. Focused
  4. Pressed (ripple)

Search suggestions & results ​

Search includes a container for suggestions and results. The container is empty by default. Use the list component to add content.

4 search result states in light and dark mode.

  1. Enabled
  2. Hovered
  3. Focused
  4. Pressed (ripple)

Measurements ​

Search bar ​

Search bar with leading and trailing icon size and padding measurements.

Unfocused search bar with leading and trailing icon measurements

Search bar with trailing avatar size and padding measurements.

Unfocused search bar with avatar measurements

In M3 Expressive, the search bar expands when focused. The margins change from 24dp to 12dp.

Unfocused search bar margins of 24dp.

Unfocused search bar margin measurements

Focused search bar margins of 12dp.

Focused search bar margin measurements

ElementAttributeValue
ContainerWidthMin: 360dp, max: 720dp
ContainerHeight56dp
ContainerLabel alignmentStart-aligned
ContainerLeading paddingUnfocused: 24dp, focused: 12dp
ContainerTrailing paddingUnfocused: 24dp, focused: 12dp
ContainerLeading icon and label padding (from tap target)4dp
ContainerLabel and trailing icon padding (from tap target)4dp
AvatarSize30dp

Contained style ​

Full-screen layout size and padding measurements in contained style.

Full-screen search padding and size measurements for contained style

Docked layout size and padding measurements in contained style.

Docked search padding and size measurements for contained style

ElementAttributeValue
Full-screen containerWidthFull width
Full-screen containerHeightFull height
Docked containerWidthMin: 360dp, max: 720dp
Docked containerHeightMin: 240dp, max: 2/3 of screen height
Search bar containerHeight56dp
Search bar containerLabel alignmentStart-aligned
Search bar containerLeading padding16dp
Search bar containerTrailing padding16dp
Search bar containerLeading icon and label padding (from tap target)4dp
Search bar containerLeading icon and label padding (from tap target)4dp

Divided style ​

Full-screen layout size and padding measurements in divided style.

Full-screen search padding and size measurements for divided style

Docked layout size and padding measurements in divided style.

Docked search padding and size measurements for divided style

Unofficial offline mirror. Content © Google, licensed under CC BY 4.0.