Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Open Roles About Block for React

A team filter over open roles for a job board, with counts on the buttons, a list that keeps its height, an empty state, and a link to send a résumé.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Open roles for React with Base UI, written for Rosterby, a fictional job board, listing the company's own jobs. A start-aligned header gives the role count and names any team that has none. Beside it, a toggle group filters by team, and each button carries that team's count, including a zero. The list under the filter shows the title, the team, the type, when the role was posted and a badge for the place. The list keeps the height of every role, so choosing a shorter team does not pull the résumé line up. Research, in the example, has no roles: the empty state names that team, and the résumé link stays. Posted times are relative ("3 days ago"), not calendar dates. The counts are computed from the roles. The page's rails and top rule come from the Guides spine. It's built from ToggleGroup, Badge, Button and Guides, with a CSS entrance and your theme's tokens for every colour. The résumé link is a link, not a primary button. For a careers band that should filter without jumping. The roles are example data.

FAQ

How do I change the roles and the teams?

The roles are ROLES and the teams are TEAMS. A role has a title, a team, a place, a type and an ago such as "6 days ago". TEAMS starts with "All" and should name every team you want on the filter, including one with no roles. Each button's count is how many roles use that team. "All" counts every role.

How does the filter work?

It is a single choice, so one team is always on. Pressing the team that is already chosen leaves it chosen. The list shows only the matching roles, and a line above the list reads the result, such as "Showing 2 of 6 roles" or "No Research roles are open". That line is a polite live region, so a change can be announced. The list's box stays as tall as every role.

What is the empty state, and does the résumé link send anything?

A team whose count is zero replaces the rows with one sentence that names the team and invites a résumé. The link under the list is always there. It is an ordinary link to # in this demo: it does not submit a form and it does not store an address.

How is it read by a screen reader?

The heading is the section's only h2. The filter is labelled "Team", and each button includes its count. The summary line announces the filter's result. Each visible role is an h3 inside a list, with the team, the type and the posted time in the line under the title. The place is a badge. The dot between those words is decorative.

How does it fit on a phone?

The filter drops under the sentence and scrolls sideways inside its own row, so five teams fit at 320 pixels without scrolling the page. A long title truncates on one line, and each row keeps a fixed height. In a right-to-left layout the filter and the rows follow the page, and the posted time keeps its order.

What moves, and what happens with reduced motion?

The header fades up once on load. With reduced motion it simply appears. Filtering swaps the rows at once, with no animation, and the résumé line stays where it is. Nothing loops. Posted times are relative on purpose, so the page does not name a calendar date.

  • Pro

    A careers close for a hiring marketplace: culture figures and a link to the open roles beside one featured role, its salary drawn as a band on a market scale.

  • Pro

    A hiring process section for an applicant tracking company's own about page: five stages drawn to scale over fourteen days, five cells saying what to expect at each, and a promise to reply within two days.

  • Pro

    An about section for a wellness-benefits company: eight perks in shared hairlines, each with a yearly amount, and a heading that is their sum.

  • Pro

    Headcount over six years as stacked columns by department, where choosing a year (focus, hover or tap) lists its departments with counts and shares.

  • Pro

    A payroll company's own benefits, switched by office: four columns for Health, Money, Time and Growth, with the wording swapping in place and a row of figures underneath.

  • Pro

    City Cards About

    Team and offices

    A snap row of tall city cards for a coworking company, with the city in large type, when the house opened, how many desks it holds, and whether it is hiring.