shadcn.io is not affiliated with official shadcn/ui
Waitlist Morph Startup Navbar Block for React
A one-bar navbar for a calendar assistant in beta: a Beta badge beside the wordmark, three plain links, and a Join the waitlist Shine Button that turns in place into an email field and then into a confirmation.
Installation
Overview
A startup navbar for React with Base UI, built around one live control. The wordmark of Fledge, a calendar assistant, leads with a Beta badge beside it; Features, Pricing and Roadmap follow as plain links with the current page marked by a foreground stroke on the bar's bottom edge. At the end of the bar the Join the waitlist Shine Button turns into an email field with a submit arrow when you press it, the cell easing wider as the layers swap, and then into "You're on the list". Escape puts the button back and focus with it; an address that isn't one is named in a small line under the field and the field is marked invalid until it's fixed; once you're on the list focus lands on the confirmation so a screen reader reads it. On a phone the links and the same control live in a sheet from the top. The block stays one bar high (64 pixels, 56 on a phone) and follows your theme. It's built from Input Group, Shine Button, Badge, Navigation Menu, Sheet and Guides. For products in beta and pre-launch sites that want an email before anything else.
FAQ
Where does the email go?
Nowhere yet: the block keeps it in memory so the control can be shown working, and it stores nothing. Open the submit handler inside Waitlist and send email to your own endpoint before it calls onStep("done"); if the request fails, leave the step on editing and set invalid or show your own message. The check is a simple pattern (EMAIL), only there to catch a typo, so validate on the server too.
How does the button become a field?
Three layers share one grid cell: the button, the form and the confirmation. Only the current one is visible, in the tab order and in the accessibility tree; the others are inert and unseen. A layer fades in with an opacity transition and fades out with opacity and visibility, which is what lets focus move into a layer the moment it appears. The cell's width (WIDTH) eases between the three states; the bar's height never changes. With reduced motion everything swaps at once.
How does it work with a keyboard and a screen reader?
Tab reaches the wordmark, the links and the button. Enter or Space turns the button into the field and puts the cursor in it; Enter submits, Escape returns to the button with focus on it. A bad address is announced as an alert and the field is aria-invalid and described by that line; the line clears once the address is valid. After a good submit focus moves to the "You're on the list" line, which is a status.
How does it work on a phone?
Below the lg breakpoint the links fold into a menu button that opens a sheet from the top, its header lined up with the bar (the wordmark where it was, the close button where the menu button was). Below sm the bar holds only the wordmark, the badge and the menu button; the waitlist control is in the sheet, where it fills the row and its controls are larger. The state is shared with the bar's copy: join in the sheet, close it, open it again and you're still on the list. Closing the sheet with the field half-open puts the button back. Nothing wraps at 320 pixels.
How do I point the links and the button at my own pages?
Edit PAGES at the top: both the bar and the sheet read it, and the page you're on takes aria-current="page". Every link points at #.
How does it sit on the page?
It's the page's first block: its + marks and rails line up with every block under it, and it draws no bottom border because the next block's top rule is its bottom edge. The header keeps overflow-x-clip for the bleeding rule; the error line drops below the bar without being cut. To keep the bar in view while the page scrolls, add sticky top-0 z-40 bg-background/80 backdrop-blur to the header.
Related
- Pro
SaaS Marketing Navbar
Mega menusA one-bar marketing navbar for a product roadmap tool: a wordmark, a Product menu of four areas with icons and one-line descriptions, plain links with the current page marked, Sign in and a Shine Button, and a sheet with the same links on phones.
- Pro
Stars Button Open Source Navbar
Meters and progressA one-bar navbar for an open source embedded database: a version badge by the wordmark, Docs, Examples and Playground links, a Releases menu of the last three versions, a GitHub stars button with a typed count and a Get started Shine Button.
- Pro
Announcement Pill Navbar
Calls to actionA one-bar navbar for a design-handoff tool with its news inside the row: an Announcement pill between the links and the actions, moved to the top of the sheet on small screens.
- Pro
Light Email Capture CTA
Forms and captureA newsletter CTA as a band between solid rails: a headline and a sentence at the start, and at the end one Shine Button that opens in place into an email field with its own Shine submit, closes on Escape and ends in a confirmation.
- Pro
Minimal Newsletter Footer
Newsletter sign-upA slim newsletter footer for a weekly letter: one centred title and line, a single email field with the Shine Button inside its box, and a legal band, with a real check and a confirmation in place.
- Pro
Reverse Split News List Hero
Updates and timelinesA 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.