shadcn.io is not affiliated with official shadcn/ui
Accordion Mentorship Team Block for React
Six mentoring pairs of a coding bootcamp as hairline accordion rows, each joining two avatars with an arrow beside the pair's names; opening a row shows the goal, the roles, the sessions held on a bar and when they meet.
Installation
Overview
A mentorship section for React with Base UI, for Beechcombe, a coding bootcamp. A start-aligned header says how many pairs there are and how many of the cohort's planned sessions have been held, both worked out from the data. Under it, hairline rows run from rail to rail and end the block. Each row joins two initials avatars with an arrow (a solid one for the mentor, a pale one for the mentee, and the arrow mirrors in right-to-left layouts) beside "Jun Watanabe mentors Olu Adeyemi" and what the pair works on. Opening a row shows the goal, both roles, a quiet bar with the sessions held written out beside it ("6 of 8 held") and when they meet. One row is open at a time, and the first is open on load. It's built from Accordion, Progress, Avatar and Guides, with CSS transitions and your theme's tokens for every colour. For a bootcamp, a mentoring programme or an internal growth page. The people, goals and session counts are invented.
FAQ
How do I change the pairs?
Edit PAIRS at the top of the file. A pair is an id, a mentor and a mentee (each a name and a role), a focus for the row, a goal, how many sessions are held and when the pair meets. TOTAL is the number of sessions every pair plans, and OPEN_PAIR names the row that is open on load. The header's counts are added up from the pairs, so they always agree with the rows.
Does the arrow flip in right-to-left languages?
Yes. The two avatars and the arrow sit in one row that follows the page direction, so the mentor is at the start and the arrow points at the mentee in either direction; the arrow also mirrors. Screen readers hear "Jun Watanabe mentors Olu Adeyemi", because the word is written out between the names; the avatars and the arrow are decoration.
How does it work with a keyboard?
Each pair is a button inside its own h3 under the section's h2. Tab moves from row to row, and Enter or Space opens and closes one.
This library leaves the arrows to Tab: every row is a tab stop, with no arrow-key roving between them.
Are the closed panels in the page's markup?
Yes. The Accordion takes hiddenUntilFound, so closed panels stay in the markup as hidden="until-found", and the browser's find in page opens the one that holds a match.
Related
- Pro
Matching Diagram Mentors Team
Learning and mentoringA framed matching diagram for a skills marketplace: six tradespeople in a column at the start, six learners at the end in another order, a hairline curve joining each pair, and the pair you hover, focus or press kept while the rest recede.
- Pro
Journey Steps Mentorship Pair Team
Learning and mentoringOne mentoring pair of a leadership program and where they are on their journey: the mentor and mentee, their cadence and topics, and four read-only steps with the week of each, two done, one current and one to come.
- Pro
Buddy Page Team
Hiring and onboardingA buddy page for an expense-report tool: the new hire and their buddy side by side with a link between them, a five-day first-week list, and three people to ask, each with what to ask them about.
- Pro
Tabbed Ladder Career Paths Team
Learning and mentoringThree career tracks as flat tabs, each a five-rung ladder drawn upward on a rail: the level, the title, one line on what it expects and the people who are on it today.
- Pro
Accordion Profiles Team
Tabs and accordionsTen people of a recruiting-tool company as hairline accordion rows that run from rail to rail; opening a row shows the department, a two-line bio, a personal quote and two text links, one row at a time.
- Pro
Mentorship Match About
CareersTwo sides of a mentorship match for a mentoring-software company, joined by a connector, with three steps underneath for how a match is made.