Repository navigation
feat: styling and theming - #29
Merged
Merged
Conversation
…s example routeLineStyle on <NavigationViewport> and <RNNavigationView>, styleURL and nightStyleURL on <NavigationView>, and a Markers example screen. Night follows the system dark mode on both platforms, also for RNNavigationView's appearance="auto".
mfazekas
force-pushed
the
feat/styling-prototype
branch
from
October 28, 2026 10:49
48e426a to
45a46f2
Compare
mfazekas
marked this pull request as ready for review
October 28, 2026 11:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Route-line colors,
<NavigationView>day/night map styles, and an example of what we do better than the alternatives: the navigation map is a regular@rnmapbox/mapsMapView, so markers, layers and React Native controls keep working during guidance.Motivation: in our comparison with other React Native navigation libraries (items U1 and U4), ATOMIQTECH's headline features are its
colorstheme and puck options. People also ask the other libraries for styling, e.g. uju777 #15 and homee #92. Custom markers and controls are among Google's most-requested features: #154, #430, #579, #190. We already support them but had no example showing it.Decisions applied:
routeLineStyle(on<NavigationViewport>and<RNNavigationView>),styleURL/nightStyleURL(on<NavigationView>and<RNNavigationView>), and the "Markers" example screen.<NavigationView>givesNavigationViewControlleronly the style for the current appearance and swaps it intraitCollectionDidChange. The SDK's style manager picks between several styles by sunrise and sunset even withautomaticallyAdjustsStyleForTimeOfDayoff (e.g. on a content size change), sousesNightStyleInDarkModealone isn't reliable. Android loads the night style ononConfigurationChanged. Without URLs both use Mapbox Standard with its night light preset; Android used to stay on the day preset.<RNNavigationView appearance="auto">now followsuseColorScheme()instead of the sun at the user's location, and the JS solar calculation is gone.puckprop, or the binding stepping aside forLocationPuck) go to a separate issue.Platform notes:
NavigationMapViewrouteColor/routeAlternateColor(unknown and low congestion),routeCasingColorandtraversedRouteColor. The SDK reads these only when it shows routes, so a change re-shows the current routes.NavigationViewController's styles set the same properties throughNavigationMapView.appearance(), which reaches every navigation map, so the map reapplies its colors indidMoveToWindow.MapboxRouteLineView.updateDynamicOptionswithRouteLineColorResources.colormaps to default + low + unknown congestion, to match iOS.Verified on the iPhone 17 simulator (iOS 26.5) and an Android emulator (API 34):
styleURL/nightStyleURLand with the defaults, starting in either mode. The Android route reappears after each style reload.<RNNavigationView>autofollows dark mode too. Both platforms.Also lint, typecheck (library and example), unit tests (62) and
yarn docs.Limitations:
routeLineStyleisn't on<NavigationView>: on iOS,NavigationViewController's style manager sets route colors through appearance proxies, so it would need aStylesubclass that leaks to every navigation map.<NavigationView>UI (banner, bottom bar) stays in day colors at night; only the map switches.Possible follow-ups: alternative casing color, traffic congestion colors, line widths, maneuver arrow colors (both SDKs expose them), and puck styling once the puck issue is decided.