shadcn.io is not affiliated with official shadcn/ui
Split Product Sketch Login Block for React
A split sign-in page for a grocery delivery service: the form at the end beside a drawn sketch of the product (a basket, a delivery slot and a total in an inset frame), with Remember me and a simulated sign-in.
Installation
Overview
Put your product beside its sign-in form with this split login block for React with Base UI. It's the sign-in of Grovecart, a grocery delivery service: 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. The form sits at the end of the band; at its start, behind a divider that meets both rules at a plus mark, a drawn sketch of the product shows a basket of four items, a delivery slot and a total, in an inset Frame over a field of Dot Pattern dots, with one line of copy under it. A Field holds the email Input, another the Password Input with its show and hide toggle and a "Forgot password?" link, a Checkbox keeps you signed in, and the Shine Button signs in, the only colored control. Sending the form checks both fields, writes each problem under its field and moves focus to the first; a good press shows a spinner for a moment, then puts the result in the form's own space and moves focus to it. The sketch is only a picture, so on a phone it's gone and the form takes the screen. It's built from Field, Input, Password Input, Checkbox, Frame, Shine Button and Guides, with a CSS entrance only. For any product that wants to show itself next to its sign-in.
FAQ
What happens when I sign in, and what stays in the page?
Nothing leaves the page. Sign in waits under a spinner for less than a second, then shows "You're signed in" with the address you typed and, if you ticked Remember me, "Stays signed in on this device"; a polite status message says nothing was sent. Sign out brings the form back with your email still filled in. To wire it for real, post the email, the password and the Remember me choice to your auth endpoint where the code says so (a server action or your auth library's sign-in call), keep the busy state until it answers, then redirect, or show its error under the field it concerns. Forgot password and Create an account are # links to point at your own routes.
Why is the Sign in button never disabled?
A disabled button can't explain itself, and keyboard users can't reach it. Here it stays enabled: 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, which reads its problem out. Typing clears that field's problem. The browser's own validation bubbles are turned off with noValidate, so the messages look the same in every browser, and each field keeps a line for its problem even when there is none, so a problem never pushes the page.
How do I change the sketch?
Edit the typed lines of the basket (name, note, quantity and price in cents). The item count and the total are worked out from them, so the picture can't disagree with itself, and each row's icon is a child you can swap for another. The sketch is decoration: it is hidden from screen readers, and what it shows is said in the line under it, so keep that line true when you change the picture. Fit it to your own product by drawing its real screen from your own components.
Does Remember me do anything?
It sets one choice and shows its effect in the result, as a real form would send it: ticked, the sign-in lasts on this device; unticked, only until the tab closes. Nothing is stored. When you wire it up, pass the value to your auth call so the session cookie gets the longer or the shorter lifetime. The checkbox is a real labelled control in the foreground tones, so the Shine Button stays the only primary-colored element.
Why is the form first in the page when the side comes first on screen?
The form comes first in the markup, so Tab order and the reading order for a screen reader start with the sign-in and the heading, and on a phone, where the side is gone, nothing has to be reordered. The side is placed at the start of the band with two grid classes (lg:col-start-1 lg:row-start-1) and the divider is its end border. It follows the page direction, so in a right-to-left layout the side sits at the right.
What do phone visitors see?
The sketch is hidden below 1024 px (max-lg:hidden), so a phone shows the product's mark, the heading, the form and the Sign in button, which ends on the first screen, with the page's rails and band intact. The sketch is a picture of the product, not part of signing in, so nothing is lost; if you want a proof on phones, add a line under the form.
Related
- Pro
Diagonal Split Release Notes Login
Split with a panelA split sign-in page for a product analytics tool: the form beside a What's new list of three releases with a slanted edge, each release a disclosure that opens its detail, and one GitHub row.
- Pro
Benefits Accordion Login
Split with a panelA split sign-in page for a freelancer back office: the form with Remember me beside five benefits as an accordion, one open at a time and the first open to start, with ruled rows.
- Pro
Feature Tour Login
Split with a panelA split sign-in page for a spreadsheet that works like a database: the form beside a wide three-tab tour (Boards, Timeline, Reports), each tab a drawn greyscale view of one table and a sentence.
- Pro
Centered Sign In Login
Centered formA 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
Staggered Reveal Sign In Login
Split with a panelA 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
App Download Login
Split with a panelA reverse split sign-in page for a running tracker: a real QR code of a download link with an iOS and Android switch that re-encodes it, a copyable link, and the sign-in form beside it. On a phone the code gives way to a Get the app link.