shadcn.io is not affiliated with official shadcn/ui
Personal Trainer Weekly Programme Profile Block for React
A personal trainer profile as this week's programme: seven day tabs that say where each day stands, exercises with sets, reps and load and a Done checkbox on each, a week bar and a count worked out from the ticks.
Installation
Overview
Show a client the week ahead and let them tick it off, with this personal trainer profile for React with Base UI. A compact header says the programme is an example, not advice, and the hairline frame under it opens on the coach: initials, name, role and place. A band holds the week: a Progress bar and a count of sessions done. Under it seven Tabs, Monday to Sunday, each saying where its day stands: Done with a tick, "2 of 4", or Rest. A day's panel lists its exercises with sets, reps and load, each with a Done Checkbox that spans its row; a rest day says so with an Empty state. A session counts as done when every exercise in it is ticked, so the bar, the count and the tabs all move together. The foot, ruled by Guides, holds a status line and a ghost Button that ticks the open day. It's built from Tabs, Checkbox, Progress, Empty, Badge, Avatar, Button and Guides, with a CSS entrance only. For a coaching platform, a gym's member page or any profile that plans a week.
FAQ
How do I fill it with my own programme?
Edit the constants at the top. DAYS lists the seven days: each has an id, a short name, the session's name and its exercises, each with a name and what it asks for as text. A day with no exercises is a rest day. WEEK_START is the Monday of the week on show and AS_OF the day the page treats as today, which labels the day's heading. TICKED_AT_LOAD lists what is ticked when the page opens; in a real app read it from the client's log. The counts, the bar and each tab's line are worked out from the ticks.
What counts as a session done?
A session is done when every one of its exercises is ticked. The count in the week band and the bar are the sessions done out of the five that are not rest days, so ticking the last exercise of Friday moves it from 3 of 5 to 4 of 5 and the tab changes from "2 of 4" to Done with a tick. Unticking an exercise moves it back. Nothing is typed twice.
What does Mark day done do?
It ticks every exercise of the day that is open and says so in the status line, with the new count. On a rest day, or a day that is already done, it says there is nothing to mark. The button is marked aria-disabled in those cases rather than disabled, so it keeps its place. Nothing leaves the page: to make it real, save each tick to your own API in the change handlers.
Is it accessible?
The tabs are a labelled tab list with a panel for each day, and every checkbox is named "Done" followed by the exercise and described by its sets and load. A tick spans the whole row, so the name is a target too. The status line is a polite live region present from the start; each tick is spoken as "Back squat: done. 2 of 4."
How does it look on a phone?
The seven tabs scroll sideways inside their band, with the next one showing. A day's panel keeps the same height for every day, so changing the day moves nothing below it, and the foot stays pinned to the bottom of the screen while the panel scrolls. The sets and loads keep their order in a right-to-left layout.
Related
- Pro
Tutor Lesson Planner Profile
Quotes and servicesA tutor profile as a lesson planner: a subject menu, lessons a week on a slider, a block of 4, 8 or 12 weeks, the cost worked out line by line, and the next free times for a trial lesson.
- Pro
Consultant Availability Profile
Schedules and bookingA consultant profile that shows capacity, not slots: eight weeks as cells with a bar of hours booked, an engagement menu that marks every week with room for it, and a request for the week you pick.
- Pro
Designer Availability Composer Profile
Schedules and bookingA designer profile as an availability composer: the visitor's card on top re-renders as you choose a status, the engagements you take and the next opening, with Save and Discard that stay local.
- Pro
Lawyer Practice and Consultation Profile
Schedules and bookingAn attorney profile with a consultation request beside her practice areas: four areas as an accordion with matters won, settled and not won, and a request with a practice area menu, a matter field with a counter, a contact choice and a draft summary.
- Pro
Mentor Availability Profile
Schedules and bookingA mentor profile that books across time zones: slots set once in UTC, a zone menu, a month grid marking the days with times, times that roll into the next day where they must, and session types with prices.
- Pro
Therapist Booking Profile
Schedules and bookingA sample therapist profile whose booking happens in the panel: three steps for the session, the time and the confirmation, an action foot with Back and one action, and a request that stays in the page.