style component

In Mapbox Studio, a style component (sometimes referred to as a "component") is a collection of related map features that you style as a single unit. Road network and Administrative boundaries are examples of components. Each component can contain one or more style layers.

You can style map features using component properties. A component property is one of a few available options for styling a single component. A single component property can control multiple layer properties across several layers.

Values for component properties are often defined using a toggle (on or off), a dropdown menu with a few options, or a slider with several options along a scale. Label density is an example of a component property for the Natural labels component. It controls several layer properties across several layers including waterway-label, natural-line-label, natural-point-label, water-line-label, and water-point-label.

Component properties are not directly related to the Mapbox Style Specification and cannot be edited outside Mapbox Studio (at runtime).


Related resources:

Was this page helpful?