shadcn.io is not affiliated with official shadcn/ui
Countries Table Team Block for React
A remote-first CRM's people by country: region tabs over a table with each country's cities, its headcount as a number and a thin bar, and three of the people who live there.
Installation
Overview
A "where we live" section for React with Base UI, for Farrowdale, a remote-first CRM. A start-aligned header sits over a ruled band of three region tabs (Americas, Europe and Asia-Pacific, each with its headcount) and one table of countries that ends the block. A country is a row: its name as the row header, its cities, its headcount as a number beside a thin bar, and three of the people who live there as initials avatars with a "+n" for the rest. All bars share one scale, so countries compare across the tabs, and each region's table has a visible caption with its total. On a phone the table keeps two columns, the country and the bar, with the cities and the people under the country. Every region is also drawn once, unseen, in the same grid cell, so switching regions moves nothing. It's built from Tabs, Avatar Group, Avatar and Guides, with a native table on every library. The people and their countries are invented.
FAQ
How do I add a country or a region?
Edit REGIONS at the top of the file. A region has an id, a label and its countries; a country has a name, its cities as one line, a count and three people. The tab counts, the captions and the header's totals are summed from the countries, and the bars are sized against the largest country in any region.
Why do the avatars not match the headcount?
The number is the headcount and the avatars are only three of those people, followed by "+n" for everyone else. Their names are in the page for assistive technology ("Includes Devi Kapoor, Sven Aldous, Marta Kowalska").
Is it a real table?
Yes: a native table with a caption, th column headers with scope="col" and each country as a th with scope="row". It is a native table on every library, because the React Aria catalog's table is a grid without captions or scopes.
How does the keyboard work?
Tab moves into the tab list, the arrow keys move between regions and Home and End jump to the ends; the table is plain content, so there is nothing else to tab to.
Related
- Pro
Office Bands Team
Hours and placesThree offices of a hotel revenue-software company as bands that run from rail to rail: the city and its address, the local time there, the headcount, and three of the people you will meet in cells that share their hairlines.
- Pro
Time Zone Axis Team
Hours and placesTen people of a remote-first payroll company laid along an axis of UTC offsets, each office with its avatars, a live local time and a shaded band where it is working time, over six cells that list the same zones.
- Pro
Office Tabs Team
Hours and placesThe four offices of a surveying app in a split: a vertical tab rail of offices beside a page with the address, the local time, the opening hours, the people who work there and a Plan a visit link.
- Pro
Floor Plan Team
Hours and placesA coworking brand's third floor drawn as a greyscale plan with eight desks you can pick, a legend of the rooms in text, and the person at the chosen desk with their room, their days and what is on their desk.
- Pro
Regional Tabs Logos
Maps and listsCustomers of a candle-subscription service by region: four tabs with counts switch a two-column list, each cell a wordmark with its city and country.
- Pro
Office Headcount Bars About
Team and officesOffice rows for a global payroll company, each with a country code, a time-zone offset and a headcount bar drawn to the scale of the largest office.