Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

New Feature Top Bar Banner Block for React

A top bar for a collaborative editor with an outline New chip, one line of news and a See it button that opens a popover preview of the feature, with a close at the end.

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 top bar for React with Base UI, a launch announcement that shows the feature rather than only naming it. Deltamere's strip sits between the page's rails: an outline "New" chip, "Collaborative editing is live" and an underlined "See it" button with a chevron, on one centred line. The button opens a small popover with a title, a sentence and a greyscale preview: a page of text lines with two named cursors, Maya's and Idris's, and a comment bubble, drawn from the theme's tokens, with a link to the changelog under it. A ghost close at the end folds the strip away with a CSS transition. The strip is 44 pixels tall on a desktop and two lines at most on a phone. It's built from Guides, Badge, Popover and Button, and it follows your theme.

FAQ

What is the preview made of, and is it accessible?

It is plain markup in the Preview component: muted bars for the text lines, two chips with a cursor icon for the people, and a bubble for the comment, all from the theme's tokens, in greyscale. It is aria-hidden because it is decoration: the popover's title and sentence say what it shows. Replace it with a screenshot or your own drawing; keep it out of the tab order.

How does the popover behave?

"See it" is a real button that opens the popover and reports aria-expanded. It opens below the button, Escape closes it and returns focus to the button, and a click outside closes it too. The popover is not modal: the page behind stays reachable. Its changelog link is an ordinary link, so you can Tab to it.

How do I change the news?

Edit FEATURE at the top of the file: the sentence (note), the button's words (open) and the changelog link's words and address (changelog, href). The chip, the sentence and the button should stay under about 60 characters so the line wraps to two at most at 320 pixels. The popover's title and sentence are in the JSX under the button.

What happens when the bar is dismissed?

The strip folds its height away (the padding is inside the fold, so it reaches 0 pixels; at once under reduced motion), becomes inert, and focus moves on to the first thing after the bar on the page. A polite status line says "Announcement dismissed." Remember the choice in a cookie your server reads, never in localStorage after the first render, which would fold the bar away on every visit.

Does it work in right-to-left layouts?

Yes. The chip, sentence and button mirror, the chevron stays as it is, the changelog link's arrow turns around, and the preview's cursors flip with the page. The popover opens on the logical side of its button.

How does it fit on a phone?

The line stays centred and wraps to two lines at most at 320 pixels. The popover is as wide as the screen allows, with 16 pixels of margin, and the preview scales to it.

  • Pro

    A slim announcement strip for a writing app's release: one centred line with the version, the news and an underlined link, and a ghost button that folds the strip away.

  • Pro

    A top bar for a developer tool whose long message stops at an ellipsis, with a More button that opens the whole text and a ghost close that folds the strip away.

  • Pro

    A showcase hero for a release planning tool: a dismissible announcement band, a headline beside the pitch, a Shine Button, a trust line and a framed sketch of a release board that runs off the bottom.

  • Pro

    A release banner for a release-management tool: the latest version set large at the start, and the three before it as a numbered list at the end, split by a solid divider.

  • Pro

    A release pill for a knowledge base: a New badge, one sentence about semantic search, a small Try it link and a dismiss button that folds the block away.

  • Pro

    A top bar for a notes app that teases its annual price: the percentage off worked out from the two prices, the monthly price struck through, the annual one beside it and an Upgrade link.