Skip to content

shadcn.io is an independent project built on shadcn/ui

Space Launch Sites Map Block for React

Eight real spaceports on a live globe, with an inclination slider that shades the latitudes an orbit sweeps and lights the sites that can launch into it.

On this page5 sections

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

Find the spaceports that can reach an orbit, with this space launch sites map for React with Base UI. Perihelion, a satellite operator that books rides from eight real launch sites, from Kourou and Sriharikota to Baikonur and Andøya, shows them on a live Map drawn as a globe that follows your theme. A Slider docked under the globe sets the orbit's inclination from 0 to 98 degrees, and the globe shades the band of latitudes that orbit sweeps: a site inside the band can launch straight into it and turns solid, a site outside stays a dashed ring, because a direct launch can't reach an inclination lower than its own latitude. A dashed line in the primary colour draws one orbit over a still Earth through the chosen site. Choosing a site, in the list or on the globe, turns the globe to face it and fills its card with the inclinations it reaches and its next two launches; pressing a launch sets the slider to that mission's orbit. Built from Map, Slider and Guides. For satellite operators, launch brokers, mission planners and science sites.

FAQ

What is the rule for reaching an orbit?

A direct launch puts a satellite in an orbit whose inclination is at least the site's latitude and at most 180 degrees minus it, so reaches checks that the site's latitude is no higher than the inclination, or than 180 minus it for a retrograde orbit. The shaded band shows the same thing: it runs from the equator to that latitude, north and south. Real missions can dog-leg or change plane later; the block says it is simplified and not an engineering model.

What is the dashed line?

One orbit's path over a still Earth: the great circle tilted by the inclination, atan(tan(i) × sin(longitude − node)), with the node placed so that the line passes over the chosen site when the site can reach the orbit, and crosses the equator at its longitude when it can't. A real ground track drifts west with every orbit as the Earth turns under it.

How does the globe turn to a site?

The block keeps one aim, the chosen site, and the camera turns the globe to face it, quickly or not at all when reduced motion is on. It aims only once the basemap has drawn as a globe, so the markers sit on their places from the first frame, and a site on the far side of the globe hides until it turns into view.

Can I use it without a mouse?

Yes. The slider takes the arrow keys and Home and End, and speaks the inclination and how many sites reach it; each site in the list and each launch in the card is a button with a pressed state. The markers on the globe are a pointer shortcut to the same choice, and a polite message gives the result once the slider rests.

How does it look on a phone?

The globe shrinks to fit the shorter map, with the slider under it, then the eight sites with their latitudes and the chosen site's card. Every row keeps its width whatever the slider says, so nothing moves as you drag. Two fingers turn and zoom the globe; one finger scrolls the page.

What stays local, and how do I use my own launches?

Everything: the sites are real places, but Perihelion, its missions and their dates are invented, and nothing is booked. The tiles are CARTO's basemaps over OpenStreetMap data, drawn by MapLibre GL. Edit SITE_LINES (id, name, country, longitude, latitude) and LAUNCH_LINES (site, ISO date, mission, inclination); dates are shown from the ISO text without locale formatting.