Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Progress Line Sign In Login Block for React

A sign-in page where the band's top rule is the progress line: pressing Sign in locks the fields and a line fills across the rule in 800 ms, then a line in the foot's place says what happened and offers Try again.

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

Show that a sign-in is working without a spinner on the page, with this progress line login block for React with Base UI. It's the sign-in of Prismane, a design-review tool: the page's two side rails run its full height and one band crosses the screen between two rules with a plus mark where each meets a rail, holding a large icon tile, a heading, one sentence and a form of an email Input, a Password Input and the Shine Button, the only colored control, with "Forgot password?" and "Create account" under them. Pressing Sign in locks both fields, the button shows its busy state and a foreground line fills across the band's top rule from one rail to the other in 800 milliseconds, with no gradient; then the line fades, the button reads "Signed in", and a line in the links' place says who signed in and offers Try again, which unlocks the fields and puts focus back on the password. The links and the result share one space, so the page never changes height. It's built from Field, Input, Password Input, Button, Shine Button and Guides, with a CSS entrance only. For tools whose sign-in should feel quick and calm.

FAQ

What happens when I sign in, and what stays in the page?

Nothing leaves the page. Sign in locks the fields for 800 milliseconds, then reports "Signed in, in this demo. Nothing was sent." in a polite status message and in the foot, and moves focus to that line; Try again unlocks the fields with your email still filled in. To wire it for real, post the email and password to your auth endpoint where the code says so and keep the locked state until it answers. The line is a fixed sweep, not a measurement of the request, so for a slow request keep it full and let the result replace it, or fade it when the answer comes.

How is the progress line drawn, and what does reduced motion do?

It's one small element laid over the band's top rule: it starts at zero width and a CSS transition scales it to the full width over 800 milliseconds, from the start side, so it fills from the other direction in a right-to-left language. It's decorative and hidden from assistive technology; the busy button and the status message carry the meaning. With reduced motion the line jumps to full without moving, and when it's done it fades out and resets without playing backwards.

Why lock the fields, and how are they locked?

While the request is out, a change to the email or password would make the page say something untrue about what was sent, so both fields sit in one native fieldset that is disabled; the browser also drops them from the form and from the tab order. Because a disabled field loses focus, focus moves to the result line when the wait ends, which a screen reader reads out. The locked fields keep their values, so the visitor sees what was sent.

Why is the Sign in button never disabled before I press it?

A disabled button can't explain itself, and keyboard users can't reach it. Here it stays enabled until a press has something to send: pressing it with an empty or malformed email, or no password, marks those fields invalid, writes one sentence under each and moves focus to the first, and the line doesn't move. Each field keeps a line for its problem even when there is none, so nothing shifts.

Why does a slug about a gradient have no gradient?

The accent here is the line's motion, not a color ramp: it's the text color, the only accent the page needs, and it works in every theme and in both light and dark. The primary color stays on the one button.

Is it usable with a keyboard and a screen reader?

Tab runs through the email, the password, its show and hide toggle, Sign in, Forgot password and Create account; Enter in either field signs in. The form is marked busy while it waits, the status message says "Signing in…" and then the result, and focus lands on the result line.

  • Pro

    A full-height sign-in page for a team chat app: the product's mark, Google and GitHub rows with lettermark tiles, an or rule, email and password checked on submit, and one Sign in button with a simulated wait and its result.

  • Pro

    A bare sign-in page for a plain-text notes app: a heading, one sentence, an email and a password written on a hairline and one Sign in button, set at the start of the page with no card, providers or footer.

  • Pro

    A sign-in page that is the whole screen: a top row with the product's mark and a create-account link, the form centered between rows, a footer row of links and a faint dot grid, with a Caps Lock note under the password.

  • Pro

    A sign-in page that opens one row at a time: a large heading at the start, the form behind a divider at the end, a valid email opens the password row, eight characters open Keep me signed in, and the button names the next step.

  • Pro

    A member sign-in page whose labels sit inside the fields and rise on focus, with text or when the browser fills them in, all in CSS, in one bordered group of two cells split by a hairline.

  • Pro

    Alert Banner Login

    Centered form

    A full-height sign-in page for a database host with a maintenance notice pinned above the form: a quiet alert with the window in UTC, a Details popover and a Dismiss that never moves the form.