A split-screen Bootstrap 6 login page. One half is a full-height mountain photo with the brand and a glass testimonial card. The other half is a clean sign-in form with Google and Apple buttons, floating labels, "Keep me logged in" and a forgot-password link. Use it as the login route of a consumer app, a membership site or a travel product.
How it works
.slp-root is a CSS grid. On phones it is one column: the photo becomes a short banner above the form and the testimonial is hidden. From 768px it switches to two columns, and the testimonial .slp-quote appears at the bottom of the photo. .slp-photo is a real <img> with object-fit: cover, positioned behind a gradient overlay (.slp-media::after) so the white text stays readable. It is not lazy-loaded, because it is above the fold.
The form uses Bootstrap 6 floating labels. In Bootstrap 6 the <label> comes before the input inside .form-floating. Validation is the new CSS-only mode: data-bs-validate on the <form> makes Bootstrap show each .invalid-feedback through :user-invalid, so no validation classes are toggled. script.js only stops the real submit, keeps aria-invalid in sync, focuses the first invalid field, and simulates the request with a spinner. Then it writes a welcome message into the .slp-status live region. The provider buttons show a "Redirecting to …" message where your OAuth redirect would go.
Customization
--slp-accentand--slp-accent-darkon.slp-root: change the button, link and checkbox color. They are mapped to--bs-primary-*,--bs-control-checked-bgand--bs-focus-ring.- Replace the
srcof.slp-photowith your own image. The photo comes from Unsplash and should be swapped for your brand's imagery. Adjustobject-positionto keep the subject in view. --slp-photo-bgon.slp-root: the tint shown while the photo loads.- Change
grid-template-columnsin themin-width: 1024pxrule to make the photo wider or narrower than the form. - Remove
.slp-quoteif you do not want a testimonial, or replace it with a feature list. - Replace the
setTimeoutin the submit handler withfetch('/api/login', { method: 'POST', body: new FormData(form) }), and point the.slp-providerbuttons at your OAuth routes.
Use cases
- Consumer apps: a full-height photo with a testimonial card sits beside the sign-in form
- Membership sites: Google and Apple buttons offer a quick way in
- Travel products: floating labels and a Keep me logged in option keep the form tidy
- Mobile visitors: the layout stacks into one column on phones
Accessibility
The page heading labels the section, and the photo has descriptive alt text. Every input has a real <label>, and invalid fields get aria-invalid="true" together with a visible message. Status messages are announced through role="status". Buttons and links have brand-colored focus outlines, and the dark overlay keeps the white text on the photo readable.
Bootstrap 6 notes
Floating labels still use .form-floating, but the label now comes first. data-bs-validate replaces BS5's validation classes and the JavaScript that toggled them. btn-solid theme-primary and btn-outline theme-secondary replace the old per-color button classes, and the checkbox is a single .check inside .form-field. Built on Bootstrap 6.0.0-alpha.1, so details may still change. Icons come from Bootstrap Icons.