Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Pet Census Team Block for React

The pets of a pet-sitting network: a census of dogs, cats and everything else as counted bars, a framed pet of the week and a two-column roster with a drawn mark, a breed and an owner for each.

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

A getting-to-know-you section for React with Base UI, for Tailwick, a pet-sitting network. The first column holds a title, a sentence counted from the data ("9 pets, and dogs lead"), a census of dogs, cats and everything else, each with a count and a bar drawn to its share of all the pets, and a line about the Friday vote. After a hairline divider the second column leads with a framed cell for the pet of the week (a drawn mark in a tile, a badge, a name, a breed, the owner and a sentence), then a roster of everyone else in two columns that share their hairlines and end the block: each pet has a drawn mark, a name, a breed and its owner as an initials avatar. On a phone the roster is one column, shows four pets and a Show all button. It's built from Progress, Avatar, Badge, Button and Guides, with CSS transitions and your theme's tokens for every colour. The people and the pets are made up for the example.

FAQ

How do I change the pets?

Edit PETS at the top of the file. A pet is a name, a breed, a mark (the drawing: dog, cat, rabbit or bird), a species (dog, cat or other, for the census), an owner and a note; one pet has week: true and leads. The census counts, the bar lengths and the sentence in the header are all worked out from that list, so adding a pet needs no other change.

What do the bars show?

Each bar is a share of all the pets, drawn with the Progress component in the theme's foreground colour, and it is named in words for a screen reader ("Dogs: 4 of 9 pets"). The count beside it is the same number as text.

Why drawn marks and not photos?

Marks and initials keep the wall calm and the same on every page, and nobody has to supply a photo. If you want pictures, put an AvatarImage before the fallback in the owner's avatar; for a pet, swap the tile's icon for an img with empty alt text, since the name is next to it.

How does it fit on a phone?

Below sm the roster is one column and shows the first four pets; a Show all button under it opens the other four. The button says whether the list is expanded and which list it controls, and its label stays the same. The census sits above the pet of the week, so the counts come first. Nothing scrolls sideways at 320 pixels.

How is the roster's last row closed?

Each pet draws its own end and bottom borders and a wrapper clips the last ones, so the page's rails close the sides and the next block's top rule closes the foot, with no doubled line. With an odd number of pets the last row holds one, and the divider between the columns still runs down it.

How is it marked up?

The census and the roster are lists, each pet has an h3 and the pet of the week is another h3 above them. The owner is read as "Owner" followed by the name; the tiles and initials are decoration.

  • Pro

    Two Truths And A Lie Team

    Culture and values

    A two-truths-and-a-lie quiz about one person: three statements as cells in a framed card, each with a drawn mark; pick the false one, press Check and each cell answers True or False.

  • Pro

    Contact Grid Team

    Grids and walls

    Six people of a legal-intake service in cells that stand apart, each an initials avatar with a presence dot and the same state in words, a role, an address and an outline Copy email button that copies it and confirms in place.

  • Pro

    Grid Cards Team

    Grids and walls

    Twelve people of a restaurant-software company in a hairline grid that runs from rail to rail, each an initials avatar with a name, a role, a department badge and a city, under a department picker that brings the picked team to the front and dims everyone else.

  • Pro

    Birthday Month Wall Team

    Culture and values

    Twelve months as hairline cells, each with the month's people as initials avatars in day order; hovering or focusing a face opens a card with the name, role and day, and no year or age appears anywhere.

  • Pro

    Culture Rituals About

    Culture and values

    A team's rituals sorted by how often they happen: three bands, every week, every quarter and every year, each with three cells that say what the ritual is, who comes and how long it takes.

  • Pro

    Book Club Team

    Interests and clubs

    A split showing a bookshop's current club read, with a chapter progress bar, the members reading along and the next meeting, beside a drawn cover plate, over a band that opens the past reads.