Skip to content

Split Login Page

Split-screen Tailwind CSS login page with a violet brand panel, inline validation, show/hide password toggle and a loading state.

Also known as: login page, sign in page, split screen login, login form with validation, auth page

Split Login Page live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A split-screen login page built with Tailwind CSS: a violet brand panel with a testimonial and key numbers on the left, and a focused sign-in form on the right. It includes inline validation, a show/hide password toggle and a simulated loading state, all in vanilla JavaScript.

How it works

The root .tls-page is a two-column grid from the lg breakpoint. The left column is an aside.tls-brand with a ring illustration (.tls-rings, whose yellow .tls-orbit-dot circles slowly), a headline, a figure testimonial and three stats. Below lg the brand panel is hidden and a compact logo appears above the form instead.

The form is marked data-tls-form and uses novalidate, so the script controls the messages. On blur it checks the email format and the password minlength; once a field is invalid it re-checks on every input event. Errors are written into the [data-tls-error] paragraph referenced by the field's aria-describedby, and aria-invalid="true" turns the border red through the aria-invalid: variant. The data-tls-reveal button switches the password type between password and text and swaps the .tls-eye and .tls-eye-off icons. On submit, an invalid form gets the tls-shake class and focus moves to the first invalid field; a valid form disables [data-tls-submit], shows the .tls-spinner and, after a short timeout, writes a success message into [data-tls-status].

Customization

  • violet-700 utilities and the linear-gradient in .tls-brand: change both to rebrand the page, for example to teal-700 and matching hex values.
  • minlength="8" on #tls-password: the script reads this value, so the error message updates automatically.
  • The window.setTimeout in the submit handler of script.js: replace it with a fetch() call to your auth endpoint (an example is in the comment).
  • lg:grid-cols-2 on .tls-page: use lg:grid-cols-[1fr_32rem] to give the form a fixed-width column.
  • animation: tls-orbit 18s in style.css: speed up, slow down or remove the orbit.
  • Remove the single sign-on button and the "or" divider if you only offer email login.

Use cases

  • SaaS products: a violet brand panel with testimonial sits beside the sign-in form
  • Web apps: inline validation and a loading state guide users through sign-in
  • Dashboards: a show and hide password toggle helps users enter credentials
  • Marketing sites: key numbers on the brand panel reinforce trust at login

Accessibility

Every input has a visible label, correct autocomplete values and aria-describedby pointing to its error text. The password toggle uses aria-pressed, aria-controls and a label that changes between "Show password" and "Hide password". The status line is a polite live region, focus outlines are always visible, and the orbit and shake animations are turned off under prefers-reduced-motion: reduce.

Usage notes

Ids such as tls-email and tls-password must stay unique on the page. Always validate credentials on the server as well; client checks only improve the experience.

Split Login Page at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Login Pages
License
Free for personal and commercial use

Questions about this template

Can I use the Split Login Page code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Split Login Page – free Tailwind CSS login page template
Split Login Page · free Tailwind CSS login page template

More Login Pages

Glassmorphism Login Page over Photo – free Pure CSS login page template

Glassmorphism Login Page over Photo

Full-page login with a frosted glass card over a scenic lake photo, password reveal toggle, inline validation and a simulated sign-in state.

Login Page with Image Carousel Panel – free Bootstrap 5 login page template

Login Page with Image Carousel Panel

Bootstrap 5 split login page with a fading photo carousel, pause control, password toggle and simulated sign-in with validation.

Centered Login Page – free Bootstrap 5 login page template

Centered Login Page

Full-page Bootstrap 5 sign-in with a centered card, Google and GitHub buttons, validated email and password fields, a show password toggle and a Caps Lock warning.