Current version: v6.5.0
View changelog
Pronounced "Doctor UI". Documentation React UI components. See @mapbox/mr-ui
.
UI components for Mapbox documentation projects.
This project is for internal Mapbox usage. The code is open source and we appreciate bug reports; but we will only consider feature requests and pull requests from Mapbox developers.
Basic.
Name | Type | Details |
---|---|---|
children REQUIRED | node |
Basic.
Name | Type | Details |
---|---|---|
src REQUIRED | string | The absolute url to the iframe. |
title REQUIRED | string | A title to describe the content of the iframe. |
MapboxAccessToken | string | Replace instance of |
gl | bool | The iframe content contains Mapbox GL. Default Default: true |
height | number | Height of iframe in pixels. Default Default: 400 |
Basic.
Name | Type | Details |
---|---|---|
location REQUIRED | object | This prop is generated by Batfish and provides location context for the current page. |
site REQUIRED | string | The site name. This is same value as the |
feedbackSentryDsn | union | The Sentry DSN (URL) to send text feedback to for issue management or Default: 'https://eccc8b561b9a461990309b01d33d54e3@sentry.io/1848287' Options:
|
preferredLanguage | string | The user's preferred code language, if available. |
section | string | The name of section the feedback component falls under. This is used by multi-structured sites. |
type | string | The type of content the user is a evaluating. Default: 'page' |
webhook | shape | The staging and production webhook URLs to send forward event data to. |
Basic
Name | Type | Details |
---|---|---|
level REQUIRED | enum | Options:
|
Basic.
Name | Type | Details |
---|---|---|
children REQUIRED | node | |
height REQUIRED | union | Options:
|
reason | string |
Basic.
Here is a little thing to note.
Name | Type | Details |
---|---|---|
children REQUIRED | node | |
theme | enum | Default: 'default' Options:
|
title | string |
Basic.
Name | Type | Details |
---|---|---|
children REQUIRED | node | |
mode REQUIRED | enum | Options:
|
platform REQUIRED | enum | Options:
|
Basic. Pass the name of the site
to the component to enable the site or "All docs" toggle.
Disable modal, only show input.
Narrow.
Name | Type | Details |
---|---|---|
background | enum | Choose from Default: 'light' Options:
|
connector | instanceOf | Option to connect to a custom search engine Default:
|
disableModal | bool | Disable modal if you always want an input Default: false |
emptyResultMessage | node | Node to display when there are no search results for the given query Default:
|
inputId | string | Override default id for input/label, used for testing Default: 'docs-search' |
narrow | bool | Collapse input to fit in a crowded space |
overrideSearchTerm | string | If |
placeholder | string | Replace the input placehoder with a different string Default: 'Search' |
resultsOnly | bool | If true, only show results from search Default: false |
segmentTrackEvent | string | Segment track event, default is (Searched docs) Default: 'Searched docs' |
site | string | Add current site filter toggle |
themeCompact | bool | If true, enable compact mode utilizing smaller text and padding, default false Default: false |
Basic.
Custom.
Icon.
Small.
Name | Type | Details |
---|---|---|
theme REQUIRED | enum | Options:
|
customBackground | custom | If the theme is set to "custom", this |
customBorder | custom | If the theme is set to "custom", this |
customColor | custom | If the theme is set to "custom", this |
customIcon | custom | customIcon is required if using the "custom" theme and |
customLabel | custom | If the theme is set to "custom", this prop is required. |
customTooltipText | custom | If the theme is set to "custom", this prop is required. |
icon | bool | If Default: false |
small | bool | If Default: false |
Basic.
The video will not autoplay. Uses poster
to set preview image.
Disable autoplay
and loop
.
Name | Type | Details |
---|---|---|
src REQUIRED | string | The path to the video. |
title REQUIRED | string | The title of the video. |
autoplay | bool | If true, the video will autoplay unless the user prefers reduced motion. Default: true |
loop | bool | If true, the video will loop unless the user prefers reduced motion. Default: true |
muted | bool | If true, the video will be muted. Default: true |
playsInline | bool | If true, the video will play on the page for iOS/Safari. If false, the video open fullscreen on play. Default: true |
poster | string | A path to a preview image for the video. Default: undefined |
Basic.
Name | Type | Details |
---|---|---|
closeModal REQUIRED | func | |
title REQUIRED | string | |
youtubeId REQUIRED | string |
No description.
Name | Type | Details |
---|---|---|
isHovered | bool | Default: false |
Basic.
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:mapbox="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"> <com.mapbox.mapboxsdk.maps.MapViewandroid:id="@+id/mapView"android:layout_width="match_parent"android:layout_height="match_parent"mapbox:mapbox_cameraTargetLat="38.9098"mapbox:mapbox_cameraTargetLng="-77.0295"mapbox:mapbox_cameraZoom="12" /> <Buttonandroid:id="@+id/startButton"android:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginLeft="16dp"android:layout_marginTop="16dp"android:layout_marginEnd="16dp"android:background="@color/mapboxGrayLight"android:enabled="false"android:text="Start navigation"android:textColor="@color/mapboxWhite"mapbox:layout_constraintStart_toStartOf="parent"mapbox:layout_constraintTop_toTopOf="parent" /></android.support.constraint.ConstraintLayout>
With filename and GitHub link.
<android.support.constraint.ConstraintLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:mapbox="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"> <com.mapbox.mapboxsdk.maps.MapViewandroid:id="@+id/runtime_mapview"android:layout_width="match_parent"android:layout_height="match_parent"mapbox:mapbox_cameraTargetLat="19.948045"mapbox:mapbox_cameraTargetLng="-84.654463"mapbox:mapbox_cameraZoom="3.371717" /> <android.support.design.widget.FloatingActionButtonandroid:id="@+id/floatingActionButton"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginEnd="16dp"android:layout_marginRight="16dp"android:layout_marginBottom="16dp"mapbox:layout_constraintBottom_toBottomOf="parent"mapbox:layout_constraintEnd_toEndOf="parent" /> </android.support.constraint.ConstraintLayout>
Name | Type | Details |
---|---|---|
code REQUIRED | string | |
filename | string | |
link | string |
Basic.
<h1>Hello world!</h1>
CodeSnippet with every feature
<h1>Hello world!</h1>
Name | Type | Details |
---|---|---|
code REQUIRED | string | The raw code. |
highlighter REQUIRED | func | The dr-ui/highlight function, example: "highlighter={highlightJson}". You must also import the function in your frontmatter. |
edit | shape | Enables the Edit in CodePen/JSFiddle buttons |
filename | string | Name of the file to add context to the code block. |
maxHeight | number | The maximum height of the code block. If set, the Edit buttons (if enabled) will move above the CodeSnippet. |
Name | Type | Details |
---|---|---|
filename | string | |
link | custom | |
toggle | node |
Basic.
Name | Type | Details |
---|---|---|
id REQUIRED | string | |
onChange REQUIRED | func | |
options REQUIRED | arrayOf | Options:
|
Basic.
map.getStyle(new Style.OnStyleLoaded() {@Overridepublic void onStyleLoaded(@NonNull Style style) { Layer settlementLabelLayer = style.getLayer("settlement-label"); if (settlementLabelLayer != null) {settlementLabelLayer.setProperties(textField("{name_ru}"));}}});
Name | Type | Details |
---|---|---|
context REQUIRED | shape | |
id REQUIRED | string | |
copyRanges | shape | |
filename | string | |
java | string | |
kotlin | string | |
limitHeight | bool | |
link | string |
Basic.
// 'style' in this case refers to an MGLStyle object.let layer = style.layer(withIdentifier: "place-city-sm") as! MGLSymbolStyleLayerlet spanish = Locale(identifier: "es")layer.text = layer.text.mgl_expressionLocalized(into: spanish)
Name | Type | Details |
---|---|---|
context REQUIRED | shape | |
id REQUIRED | string | |
swift REQUIRED | string | |
copyRanges | shape | |
filename | string | |
limitHeight | bool | Default: true |
link | string | |
objectiveC | string |
Basic.
Name | Type | Details |
---|---|---|
html REQUIRED | string | |
js REQUIRED | string | |
css | string | |
frontMatter | shape | |
head | string | |
resources | shape |
Using highlighter with CodeSnippet.
import Mapboxclass ViewController: UIViewController {override func viewDidLoad() {super.viewDidLoad() let url = URL(string: "mapbox://styles/mapbox/streets-v10")let mapView = MGLMapView(frame: view.bounds, styleURL: url)mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]mapView.setCenter(CLLocationCoordinate2D(latitude: 59.31, longitude: 18.06), zoomLevel: 9, animated: false)view.addSubview(mapView)}
Basic.
override func viewDidLoad() {super.viewDidLoad() let mapView = MGLMapView(frame: view.bounds)mapView.styleURL = MGLStyle.lightStyleURLmapView.autoresizingMask = [.flexibleWidth, .flexibleHeight] mapView.setCenter(CLLocationCoordinate2D(latitude: 44.971, longitude: -93.261), zoomLevel: 10, animated: false) mapView.delegate = selfview.addSubview(mapView)}
Name | Type | Details |
---|---|---|
code REQUIRED | string | Raw (unhighlighted) code. When the user clicks a copy button, this is what they'll get. If no |
highlightThemeCss REQUIRED | string | CSS that styles the highlighted code. |
characterWidth | number | The width of a character in the theme's monospace font, used for indentation. If you use a font or font-size different than the default theme, you may need to change this value. Default: 7.225 |
collapseLines | bool | Determines if non-copiable lines (when using If false, a Default: true |
copyRanges | arrayOf | Specific line ranges that should be independently copiable. Each range is a two-value array, consisting of the starting and ending line. If this is not provided, the entire snippet is copiable. Options:
|
highlightedCode | string | The HTML output of running code through a syntax highlighter. If this is not provided, |
maxHeight | number | A maximum height for the snippet. If the code exceeds this height, the snippet will scroll internally. |
Name | Type | Details |
---|---|---|
code REQUIRED | string | |
highlightedCode REQUIRED | string | |
id REQUIRED | string | |
selectedLanguage REQUIRED | string | |
changeLanguage | func | |
copyRanges | object | |
filename | string | |
limitHeight | bool | Default: true |
link | string | |
options | array |
"example" layout, interior page.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
"example" layout, index page (has navOrder in frontmatter)
"full" layout with custom "domain" prop
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
"page" layout.
"page" layout.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Name | Type | Details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
constants REQUIRED | shape |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frontMatter REQUIRED | shape |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
location REQUIRED | shape | Provided by Batfish, the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
navigation REQUIRED | shape |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppropriateImage | func | Required if using the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
children | node | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
domain | shape | The domain's title and homepage path to be added as the first Breadcrumb link Default:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
feedbackSentryDsn | union | For Options:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filters | objectOf | An object of filters. This dataset can be generated with @mapbox/dr-ui/helpers/batfish/filters.js. Options:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headings | array | For when headings are dynamic, this is used by API docs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hideSearch | bool | Hide Search component from the sidebar Default: false |
Basic.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Name | Type | Details |
---|---|---|
headings | arrayOf | Array of headings Options:
|
themeWrapper | string | Assembly classes to apply to the containing wrapper Default: '' |
topOffset | number | Threshold that the anchor must pass to be considered the active anchor Default: 120 |
Basic.
Current version: v0.1.0
View changelog
Change background color and text with theme
and lightText
.
Learn about the building blocks that Mapbox provides so you can create custom mapping applications.
Name | Type | Details |
---|---|---|
title REQUIRED | string | title of the product |
card | bool | If |
changelogLink | string | creates a "View changelog" link |
contactLink | string | creates a "Contact us" button |
customTagProps | shape | |
description | string | description of the product |
features | arrayOf | features of the product |
ghLink | string | creates a "Contribute on GitHub" link |
highlightColor | string | The highlight color, adds a thin colored line to the left used in the help docs |
image | node | image of the product |
installLink | string | creates an "Install" button |
lightText | bool | If Default: false |
tag | enum | Options:
|
theme | string | Classes to apply to the OverviewHeader containter, usually an Assembly background color: https://labs.mapbox.com/assembly/documentation/#Background-colors |
titleIcon | node | an image to display to the left of the title, used in the help docs |
version | string | version number of the product |
No description.
Name | Type | Details |
---|---|---|
path REQUIRED | string | |
title REQUIRED | string | |
description | string | |
language | string | |
level | node | |
link | string | |
thumbnail | node |
Use cardColSize
to show 4 items per row.
Full-width cards, no image
Name | Type | Details |
---|---|---|
cards REQUIRED | arrayOf | |
cardColSize | enum | Default: '1/2' Options:
|
fullWidthCards | bool | Default: false |
path | string | |
title | string |
The AnalyticsShell adds Sentry and initializes @mapbox/web-analytics from docs-page-shell.
Name | Type | Details |
---|---|---|
children REQUIRED | node | |
location REQUIRED | shape | Location object (often provided by Batfish), |
disableSentry | bool | If Default: false |
disableWebAnalytics | bool | If Default: false |
domain | string | Production website domain. Default: 'https://docs.mapbox.com' |
mbxMetadata | shape | Object of properties to send to Segment Default: {} |
sentry | shape | Customize Sentry options. Default:
|
sentryPerformance | shape | Customize Sentry performance monitoring options. To disable performance, set this value as an empty object: Default:
|
webAnalytics | object | Customize web-analytics options. Default:
|
Basic.
Name | Type | Details |
---|---|---|
children REQUIRED | node | Wrap ErrorBoundary around components to catch any errors triggered from within those nodes. |
errorNote | node | Contents of error note. Default: <p>We sent the error to the team. Please refresh the page to try again.</p> |
errorNoteTitle | string | Title of error note. Default: 'Something went wrong' |
setExtra | object | Each key/value will be added as extra context to the Sentry issue. |
Basic.
Plugins offer features and functionality related to map controls and other things that users can touch or interact with, like draw tools, map export tools, directions and geocoding controls, and more.
Adds controls for a ruler, style inspector, localization, and style switcher.
Name | Type | Details |
---|---|---|
pluginData REQUIRED | object | |
AppropriateImage | node |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |
Basic.
Name | Type | Details |
---|---|---|
size | number | Default: 60 |