shadcn.io is not affiliated with official shadcn/ui
Corner Ribbon Banner Block for React
A start-aligned early-access card for an API platform: a corner ribbon on the end-top corner, a sparkle, a heading, two sentences, a data list of three facts and a link to the migration guide.
Installation
Overview
An early-access card for React with Base UI. A muted shell with + marks on its corners holds a raised panel, aligned to the start, with a ribbon across its end-top corner reading "Early access". Inside: a sparkle, "Stream rows out as they land", two sentences about what it replaces and what keeps working, a data list of three facts (Status: Beta, Sunset of v2: After GA, Auth: Token based) between hairlines, and a text link to the migration guide. The ribbon is a rotated strip of plain CSS, clipped by the panel's own box, and in a right-to-left layout it turns to the other corner. The page's rails and top rule come from the Guides spine. It's built from Guides, Data List and Badge, with your theme's tokens for every colour. For betas, previews, deprecations and any feature people should try with the caveats in view.
FAQ
How do I change the facts?
Edit FACTS at the top of the file: a label, a value, and whether the value is set in a badge. They render as a real description list, a term and its description per row, so a screen reader hears "Status, Beta". Two to four rows fit the panel; more would push the card past a comfortable height.
How does the corner ribbon work?
It's one span: a 9rem strip, turned 45 degrees with rotate-45, parked across the end-top corner with logical offsets (-end-9 top-7) inside the panel, which has overflow-hidden and rounded corners so the strip's ends are cut off. The shell's + marks sit outside the clip. Its label is real text. On phones the heading gets extra end padding so it never runs under the ribbon.
What happens in a right-to-left layout?
The ribbon is placed with logical offsets, so it stays on the end corner, which is now the physical left, and it turns the other way (rtl:-rotate-45) so it keeps crossing the corner the same way. The card's content mirrors, and the arrow in the link flips.
Why is the guide a text link and not a button?
The card has no call to action competing with the page's main one: it informs. A link with an underline and a trailing arrow reads as "go and read", and it keeps a visible focus ring. Swap it for a Shine Button if the card should lead somewhere you want people to go.
Related
- Pro
Achievement Ribbon Banner
Stacked cardsA centred milestone card for a running app: a corner ribbon reading Unlocked, a trophy, a heading, one sentence, a track of five pips with three earned, the next milestone named, and a Shine Button.
- Pro
Guarantee Ribbon Banner
Stacked cardsA centred refund guarantee for a notebook app: a corner ribbon reading Secured, a shield, a heading, one sentence, the 30-day window drawn as a bar of thirty cells, and fine print under a rule.
- Pro
Info Alert Banner
AlertsAn in-page info callout for an invoicing app: a card in card with an info icon, a heading, two sentences about a change coming next month, a Shine Button link and a dismiss button that folds the block away.
- Pro
Stacked Download Card Banner
Stacked cardsA centred download card for a desktop sketching app: a version badge, a heading and a sentence over a tinted band with a three-platform segment control and a download button that runs idle, downloading and done.
- Pro
Trial Upgrade Multi-Action Banner
Choices and promptsA trial prompt card for a video editor that sets what you have now beside what stays after the trial, in two columns, with upgrade, compare and remind-me-later actions.
- Pro
Activity Proof Stacked Banner
Stacked cardsA centred social-proof card for a team workspace: a line saying who and how many teams upgraded this week, with the count rolling up, a sentence, a ringed avatar stack and a Shine Button.