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/personal-trainer-profile.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/fitness/fitness1.tsx instead.
Usage
The file also exports fitness1Demo, 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 { Fitness1, fitness1Demo } from "@/components/blocks/fitness/fitness1"; export default function Page() { return <Fitness1 {...fitness1Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | { label: string; variant?: BadgeVariant } | none | Pill above the name; only rendered when badge is truthy. |
| name | string | none | Trainer's full name. |
| title | string | none | Trainer's role or specialty, shown under the name. |
| bio | string | none | Short paragraph describing the trainer's approach. |
| photo | { src: string; alt: string } | undefined | Trainer headshot; falls back to MediaSlot's placeholder gradient when omitted. |
| rating | number | none | Star rating out of 5; rounded to the nearest whole star for the filled-star display. |
| reviewCount | number | none | Number of reviews shown next to the rating. |
| certifications | CertificationItem[] | [] | Certification badges below the bio. |
| stats | StatItem[] | [] | Floating stat tiles overlaid on the photo's bottom edge. |
| buttons | ButtonItem[] | [] | CTA buttons below the certifications. |
| className | string | none | Extra classes for the outer section element. |
Types
type CertificationItem = { label: string }; type StatItem = { label: string; value: string }; type ButtonItem = { label: string; href?: string; variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive"; };
Behavior notes
- The floating stats card is absolutely positioned over the bottom edge of the photo and only renders when stats has at least one entry.
- rating renders as 5 Star icons, filled up to Math.round(rating); it does not render half-filled stars for fractional ratings like 4.5.
- certifications and buttons each collapse cleanly (no empty wrapper) when their array is empty.
- photo is optional; when omitted, MediaSlot renders its own decorative placeholder gradient with a centered image icon rather than leaving a blank box.
- Book a session and View programs buttons are static links (render={<Link/>}) with no booking logic behind them; wiring a real booking flow is left to the consumer.
More Fitness Blocks
View all →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.
Gym Location Finder
Location section with map preview, address, hours, parking, and public transit info.
Transformation Gallery
Before/after photo grid showcasing member transformations with weight loss stats and testimonial quotes.