Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Inset Count Badge CTA Block for React

A centred card-in-card hiring CTA whose Shine Button wears a pinned count of open roles, with three featured roles as links in one hairline-divided strip below it.

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

Put a number on your call to action with this hiring block for React with Base UI. A muted shell with + marks on its corners wraps a raised panel that follows your theme: a large headline, a line of copy for a routing API's team, a Shine Button that wears a small count badge pinned to its corner, and three featured roles as links in one strip of cells divided by hairlines, with a single outer radius. The count isn't typed in: it's the sum of the open roles in the team list at the top of the file, so it can't drift from the data. The badge is a solid foreground chip, so the button stays the only primary control. It's built from Guides, Shine Button, Float, Badge and Item, with CSS transitions for the entrance and your theme's tokens for every colour. Made for careers pages, open-source contributor calls, beta waitlists and any prompt where "how many" is part of the pitch.

FAQ

Where does the number on the button come from?

It's OPEN_ROLES, computed from the TEAMS array at the top of the file, where each team has a name and a number of open roles. Change a team's number, add a team, or replace the array with data from your applicant system, and the badge and the copy ("across 4 teams") follow. The badge is a Float pinned to the button's top corner, inside a relative wrapper. The Shine Button doesn't change size on hover, so the badge never moves out from under its corner.

What do screen readers hear for the badge?

The button is a link named "View open roles", and the badge right after it reads "12 open roles": the digits and an sr-only unit, so the number is never spoken alone. The badge doesn't take clicks (pointer-events-none), so the whole target stays the button, and its figure sits in a bdi so it keeps its digits in right-to-left text.

Does the badge stay on the end corner in right-to-left languages?

Yes. Float pins to the inline end, which is the opposite corner in a right-to-left layout, and the block adds the matching mirrored nudge so the badge straddles the corner there as it does in left-to-right. The arrows in the cells mirror too.

Does the panel follow my theme?

Yes. The panel has no dark scope: it is light on a light page and dark on a dark page, using bg-card with a shadow-lg and a ring-1 ring-foreground/15 hairline to stand out from its muted shell, whose corners carry + marks. To make it louder, strengthen the ring or the shadow.

When should I use a count badge instead of a plain button?

Use it when the number is the reason to click: open roles, unread items, seats left. If the count rarely changes or isn't persuasive, the Inset Announcement Badge version gives you one clear step without a figure that has to stay true.

  • Pro

    A card-in-card call to action for a code editor's AI completion: the headline and one sentence at the start, a linked announcement pill and a Shine Button at the end, in a muted frame with + marks on its corners.

  • Pro

    Card Inset Metric Row CTA

    Figures and stats

    A start-aligned card-in-card CTA for an API platform: a headline, one sentence and two calls to action, with three platform figures in a closing band across the foot of the panel.

  • Pro

    A reverse-split card-in-card call to action for a migration: a ruled timeline of three steps with a time chip each and a closing total, beside the headline and a Shine Button, with trust points on the shell beneath.

  • Pro

    A centred card-in-card guarantee that follows your theme: a headline naming the refund window over a band of three terms on shared hairlines, each promise with its value at display size, and one Shine Button.

  • Pro

    Centered Launch Badge Hero

    Logos and social proof

    A centered launch-day hero with a rank badge that links to the launch page, a Shine Button and three launch metrics in separate cells whose hairlines overshoot their corners.

  • Pro

    Reverse Split News List Hero

    Updates and timelines

    A reverse split hero on drafting lines for a team docs workspace: a greyscale product illustration beside an announcement pill, the headline, a ruled list of the latest updates as links, a Shine Button and a second action.