Select platform: [Android](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-custom-styling.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/places/ios-sdk/places-ui-kit-custom-styling.md.txt "View this page for the iOS platform docs.") [JavaScript](https://developers.google.com/maps/documentation/javascript/places-ui-kit/custom-styling.md.txt "View this page for the JavaScript platform docs.")

<br />

# Customizeable style properties

[![Place details visual customization](https://developers.google.com/static/maps/documentation/places/images/place-details-visual-customization.jpg)](https://developers.google.com/static/maps/documentation/places/images/place-details-visual-customization.jpg) Visual customization examples


You can customize the colors, typography, spacing, borders, and corners of these Places UI kit components and non-UI kit features:

- [Place Details component](https://developers.google.com/maps/documentation/places/ios-sdk/place-details-ui-kit.md.txt)
- [Place Search component](https://developers.google.com/maps/documentation/places/ios-sdk/place-search-ui-kit.md.txt)
- [Basic Place Autocomplete component](https://developers.google.com/maps/documentation/places/ios-sdk/basic-place-autocomplete-ui-kit.md.txt)
- [Non-UI Kit Place Autocomplete widget](https://developers.google.com/maps/documentation/places/ios-sdk/place-autocomplete.md.txt)


Places UI kit offers a design system approach to visual customization roughly based on [Material Design](https://m3.material.io) (with some Google-Maps-specific modifications). See Material Design's reference for [Color](https://m3.material.io/styles/color/overview) and [Typography](https://m3.material.io/styles/typography/overview). By default, the style adheres to the Google Maps visual design language.


Use the [Customization tool](https://developers.google.com/maps/documentation/places/ios-sdk/places-ui-kit-customization-tool.md.txt) to visualize custom configurations in a Places UI Kit element. The **Code** tab provides configurations in HTML/CSS, Kotlin/XML, and Swift.

> [!IMPORTANT]
> **Important:** When making visual modifications, you must adhere to the [Google Maps attribution requirements](https://developers.google.com/maps/documentation/places/ios-sdk/places-ui-kit-attr-req).

![Place details customization options](https://developers.google.com/static/maps/documentation/places/images/place-details-color-typography-customization.jpg)


The look and feel of the component is customized with the [`placesMaterialColor`](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlacesMaterialColor.md.txt), [`placesMaterialFont`](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlacesMaterialFont.md.txt), [`placesMaterialShape`](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlacesMaterialShape.md.txt), and [`placesMaterialTheme`](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlacesMaterialTheme.md.txt) structs.

> [!IMPORTANT]
> The Places UI Kit provides a dark theme by default, so you may need to customize both dark and light themes. To customize the dark theme, add values for `.dark` and `attribution.darkModeColor` to your custom theme.

## Customization tool


Use this tool to visualize custom configurations in a Places UI Kit element. The **Code** tab provides configurations in HTML/CSS, Kotlin/XML, and Swift.
<iframe src="https://developers.devsite.google/frame/maps/documentation/places/ios-sdk/places-ui-kit-custom-styling_fcb3c2454d7b68d88168be718dbc23f54db33a48da1d7e86a6a8b9b84a9646ee.frame" class="framebox inherit-locale " allow="clipboard-write https://developers.devsite.google" allowfullscreen is-upgraded></iframe>

## Style properties

You can customize the following styles:

| Theme attribute | Usage |
| Color ||
|---|---|
| `theme.color.surface` | Container and dialog background |
| `theme.color.outlineDecorative` | Container border |
| `theme.color.primary` | Links, loading indicator, overview icons |
| `theme.color.onSurface` | Headings, dialog content |
| `theme.color.onSurfaceVariant` | Place information |
| `theme.color.secondaryContainer` | Button background |
| `theme.color.onSecondaryContainer` | Button text and icon |
| `theme.color.neutralContainer` | Review date badge, loading placeholder shapes |
| `theme.color.onNeutralContainer` | Review date, loading error |
| `theme.color.positiveContainer` | Available EV charger badge |
| `theme.color.onPositiveContainer` | Available EV charger badge content |
| `theme.color.positive` | Place "Open" now label |
| `theme.color.negative` | Place "Closed" now label |
| `theme.color.info` | Accessible entrance icon |
| `theme.measurement.borderWidthButton` | Open in maps and OK buttons |
|   |   |
| `theme.font.bodySmall` | Place information |
| `theme.font.bodyMedium` | Place information, dialog content |
| `theme.font.labelMedium` | Badge content |
| `theme.font.labelLarge` | Button content |
| `theme.font.headlineMedium` | Dialog headings |
| `theme.font.displaySmall` | Place name |
| `theme.font.titleSmall` | Place name |
|   |   |
| `theme.measurement.spacingExtraSmall` |   |
| `theme.measurement.spacingSmall` |   |
| `theme.measurement.spacingMedium` |   |
| `theme.measurement.spacinglarge` |   |
| `theme.measurement.spacingExtraLarge` |   |
| `theme.measurement.spacingTwoExtraLarge` |   |
|   |   |
| `borderWidth` | Container |
| `theme.measurement.borderWidthButton` |   |
|   |   |
| `theme.shape.cornerRadius` | Container |
| `theme.shape.cornerRadiusButton` | Open in Maps and OK buttons (excludes round icon button) |
| `theme.shape.cornerRadiusThumbnail` | Place thumbnail image |
| `theme.shape.cornerRadiusCollageOuter` | Media collage |
| `theme.shape.cornerRadiusCard` | Place card, User review card |
| `theme.shape.cornerRadiusDialog` | Google Maps disclosure dialog |
|   |   |
| `attribution.lightModeColor` | Light theme Google Maps attribution and disclosure button (enums for white, gray, and black) |
| `attribution.darkModeColor` | Dark theme Google Maps attribution and disclosure button (enums for white, gray, and black) |

### Attribution colors

[![attribution](https://developers.google.com/static/maps/documentation/places/images/place-details-attribution.jpg)](https://developers.google.com/static/maps/documentation/places/images/place-details-attribution.jpg) Attribution


[Google Maps' terms of service](https://cloud.google.com/maps-platform/terms) require you to use one of three brand colors for the Google Maps attribution. This attribution must be visible and accessible when customization changes have been made.


We offer 3 brand colors to choose from that can be independently set for light and dark themes:

- Light theme: `attributionColorLight` with enums for white, gray, and black.
- Dark theme: `attributionColorDark` with enums for white, gray, and black.

### Examples

This function creates a theme that overrides the default style attributes. Any theme attributes that are not overridden use the default styles.

### Swift

```swift
  // Same for compact and full
func makeTemplateTheme(colorScheme: ColorScheme) -> PlacesMaterialTheme {
  var theme = PlacesMaterialTheme()
  var color = PlacesMaterialColor()
  color.surface = (colorScheme == .dark ? .blue : .gray)
  color.buttonBorder = (colorScheme == .dark ? .pink : .orange)
  color.outlineDecorative = (colorScheme == .dark ? .white : .black)
  color.onSurface = (colorScheme == .dark ? .yellow : .red)
  color.onSurfaceVariant = (colorScheme == .dark ? .white : .blue)
  color.onSecondaryContainer = (colorScheme == .dark ? .white : .red)
  color.secondaryContainer = (colorScheme == .dark ? .green : .purple)
  color.positive = (colorScheme == .dark ? .yellow : .red)
  color.primary = (colorScheme == .dark ? .yellow : .purple)
  color.info = (colorScheme == .dark ? .yellow : .purple)
  var shape = PlacesMaterialShape()
  shape.cornerRadius = 10
  var font = PlacesMaterialFont()
  font.labelLarge = .system(size: UIFontMetrics.default.scaledValue(for: 18))
  font.headlineMedium = .system(size: UIFontMetrics.default.scaledValue(for: 15))
  font.bodyLarge = .system(size: UIFontMetrics.default.scaledValue(for: 15))
  font.bodyMedium = .system(size: UIFontMetrics.default.scaledValue(for: 12))
  font.bodySmall = .system(size: UIFontMetrics.default.scaledValue(for: 11))
  var attribution = PlacesMaterialAttribution()
  attribution.lightModeColor = .black
  attribution.darkModeColor = .white
  theme.measurement.borderWidthButton = 1
  theme.color = color
  theme.shape = shape
  theme.font = font
  theme.attribution = attribution
  return theme
}
```

#### Full examples for each component or feature

- [Place Details component styling example](https://developers.google.com/maps/documentation/places/ios-sdk/place-details-ui-kit.md.txt#customize-style-attributes).
- [Place Search component styling example](https://developers.google.com/maps/documentation/places/ios-sdk/place-search-ui-kit.md.txt#customize-the-theme_1).
- [Basic Place Autocomplete component styling example](https://developers.google.com/maps/documentation/places/ios-sdk/basic-place-autocomplete-ui-kit.md.txt#example).
- [Place Autocomplete widget styling example](https://developers.google.com/maps/documentation/places/ios-sdk/place-autocomplete.md.txt#new_examples).