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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | { label: string; variant?: BadgeVariant } | none | Pill above the heading; only rendered when badge is truthy. |
| heading | string | none | Section heading. |
| description | string | undefined | Section intro text. |
| mapImage | { src: string; alt: string } | undefined | Map preview image; falls back to MediaSlot's placeholder gradient, since this block never embeds a real interactive map. |
| address | string | none | Street address, always shown. |
| hours | HoursItem[] | [] | Opening-hours rows. |
| parkingInfo | string | undefined | Parking note; row only renders when set. |
| transitInfo | string | undefined | Public transit note; row only renders when set. |
| directionsHref | string | undefined | Link target for the Get directions button; the button renders as an inert non-navigating element when omitted. |
| className | string | none | Extra 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.
More Fitness Blocks
View all →Personal Trainer Profile
Trainer showcase with photo, certifications, rating, and client stats in a floating card.
Class Schedule Hero
Hero showcasing today's fitness classes with instructor info and available spots.
Training Program Cards
Program grid with images, duration, frequency, skill level, and enrollment buttons.
Transformation Gallery
Before/after photo grid showcasing member transformations with weight loss stats and testimonial quotes.