Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Journey Map Pins Gallery Block for React

A walk round a drawn island: six numbered stops on a map that open a picture, Previous and Next buttons that move along the trail, and a list of the stops with their days and kilometres.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A map gallery for React with Base UI. A split: at the start, a drawn island in a hairline frame, with its coast, shallows, contours and trail as paths and six numbered stops on it. Each stop is a button that opens a popover with its picture; Previous stop and Next stop under the map move the active stop along the trail, which is ringed on the map and marked in the list, with a line that says where you are. At the end, the list of stops is the real content: each has a day and the kilometres from the start (worked out from the legs), and its name is a button that sets it active. On a phone the map comes first and the list under it. The island and every picture are drawn in the theme's greys, and the map is not to scale. It's built from Guides, Popover and Button, with CSS transitions for the entrance. For travel journals, route guides, walking holidays and trails.

FAQ

How is the island drawn?

The coastline is fourteen points around a centre with seeded wobble, joined into one smooth closed path; the shallows, the land and the contours are the same shape at different sizes, and the trail is a smooth path through the stops' own coordinates. Edit STOPS and the trail follows; with a real map, replace Island with your own image and keep the pins.

What do Previous and Next do?

They move the active stop one step along the trail (the first and last are disabled at the ends), ringing its pin, highlighting its row and announcing "Stop 3 of 6, Wrenfold Wood, day 2, 17 km from the quay". They do not open the popover; pressing a pin does.

Where do the kilometres come from?

Each stop has the length of the leg that leads to it. The kilometres from the start are the legs added up, and the total and the number of days in the caption are worked out from the same list.

Which keys work?

Tab goes through the pins in trail order, then the two buttons and the list. Enter or Space on a pin opens its popover and Escape closes it, returning focus to the pin; a stop's name in the list is a button that sets it active.

How does it fit on a phone?

The map fills the width, the status line between the buttons is hidden (the list says the same) and each stop's note is left to the popover; nothing scrolls sideways at 320 pixels.

What about right-to-left languages?

The map is a drawing, so it keeps its own direction; the chevrons on the buttons turn, and the list and header follow the page.

  • Pro

    A shipping-ops console drawn in greyscale with six numbered pins that open a popover on click, tap or Enter, and a legend of six rows in shared hairlines that opens the same popovers.

  • Pro

    A shipment's route as one vertical road with five stops that alternate sides, solid up to the truck's stop and dashed beyond, each with its time and a done, now or expected badge.

  • Pro

    Carousel Gallery

    Carousels and slides

    Nine drawn trail pictures in a ruled band for a trail-guide app, three wide with the next one cut off at the rail, turned with buttons, dots and the arrow keys, under a heading row with a live counter.

  • Pro

    Stories Gallery

    Carousels and slides

    A tray of six round highlights for a day-journal app that opens a full-screen viewer with segmented progress bars, tap zones, Previous and Next, a Pause toggle, auto-advance and focus that returns to the highlight.

  • Pro

    A vertical timeline of drawn pictures hung on a hairline through five years of a tools maker's story, with a year index that marks the year in view, jumps on choosing one and becomes a row of chips on a phone.

  • Pro

    A photo essay of five framed pictures in alternating rows, with a Short and Full switch: Short shows each title, Full adds the place, date, credit and a two-sentence story.