Staaarter

Gym Location Finder

Location section with map preview, address, hours, parking, and public transit info. Perfect for gym contact pages and multi-location fitness centers.

By Staaarter Team
Fitness
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/gym-location-finder.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/fitness/fitness4.tsx instead.

Usage

The file also exports fitness4Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Fitness4, fitness4Demo } from "@/components/blocks/fitness/fitness4";

export default function Page() {
  return <Fitness4 {...fitness4Demo} />;
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: BadgeVariant }nonePill above the heading; only rendered when badge is truthy.
headingstringnoneSection heading.
descriptionstringundefinedSection intro text.
mapImage{ src: string; alt: string }undefinedMap preview image; falls back to MediaSlot's placeholder gradient, since this block never embeds a real interactive map.
addressstringnoneStreet address, always shown.
hoursHoursItem[][]Opening-hours rows.
parkingInfostringundefinedParking note; row only renders when set.
transitInfostringundefinedPublic transit note; row only renders when set.
directionsHrefstringundefinedLink target for the Get directions button; the button renders as an inert non-navigating element when omitted.
classNamestringnoneExtra classes for the outer section element.

Types

type HoursItem = { days: string; hours: string };

Behavior notes

  • mapImage is a static preview, not a real embedded/interactive map; supply a screenshot-style image or leave it unset to show MediaSlot's placeholder gradient.
  • The hours, parkingInfo, and transitInfo rows each render independently and only when their data is present; address is the only always-shown row in the info column.
  • Get directions is a static link (render={<Link/>}) when directionsHref is set, and a plain inert button otherwise; there is no real geolocation or map-linking behavior.