Skip to content
HTML Templates For Developers

Documentation

Latchkey — HTML Login Template

Version 1.0.0 · Vanilla HTML · 10 files · 48 KB

Back to the template

Getting started

  1. Unzip the download and open index.html in a browser. No server, installation or build step is needed.
  2. Edit the text directly in the HTML files.
  3. Change colours, fonts and spacing through the CSS custom properties at the top of assets/css/style.css.
  4. Replace the artwork in assets/images/ with your own images.
  5. Upload the whole folder to any static host.

File structure

The download contains these 10 files:

  • LICENSE.txt1.3 KB
  • README.md2.3 KB
  • assets/css/style.css11 KB
  • assets/fonts/geist-LICENSE.txt4.4 KB
  • assets/fonts/geist-latin-wght-normal.woff229 KB
  • assets/images/favicon.svg323 B
  • assets/js/main.js7.1 KB
  • documentation/index.html12 KB
  • documentation/licenses/lucide-LICENSE.txt3.1 KB
  • index.html8.9 KB

Colours

These custom properties are defined at the top of the stylesheet. Change a value once and it updates everywhere it is used.

  • --color-canvas#f8fafc
  • --color-surface#ffffff
  • --color-ink#0f172a
  • --color-text#334155
  • --color-muted#64748b
  • --color-line#e2e8f0
  • --color-line-strong#cbd5e1
  • --color-primary#2563eb
  • --color-primary-dark#1d4ed8
  • --color-primary-soft#dbeafe
  • --color-danger#b91c1c
  • --color-danger-soft#fef2f2
  • --color-danger-line#fecaca
  • --color-ok#15803d
  • --color-ok-soft#dcfce7

Interactive features

Sign-in form

Edit the signIn() function in assets/js/main.js: replace the timeout with a request to your API and call done(true) or done(false). Remove the DEMO constant and the demo hint paragraph (id demo-credentials).

Password toggle

Add data-toggle-password="<input id>" to any button next to a password input and the same script will drive it.

Panel swap

Any button with data-show-panel="<panel id>" shows that .panel and hides the others, then focuses its heading. Add new panels by copying one.

Forgot-password form

Replace the timeout in initForgot() with a call to your reset endpoint. Keep the confirmation neutral so you do not reveal which emails exist.

Customisation notes

Demo credentials

Email [email protected] and password Latchkey#24 sign in successfully; any other valid-looking pair shows the error banner. They are defined in the DEMO object at the top of assets/js/main.js.

Accent colour

Change --color-primary, --color-primary-dark and --color-primary-soft in :root. The focus ring uses --ring.

Card width

Set --card-width in :root to make the card narrower or wider.

Simulated delay

DELAY in main.js controls the loading time in milliseconds. Set it to 0 once a real request is in place.

What is front-end only

This is a front-end template. The behaviours below are demonstrations that run in the browser; connect them to your own server or service before relying on them.

  • Nothing is sent or stored and no real authentication happens: the sign-in compares against demo credentials in JavaScript, and the password-reset form only simulates sending an email.
  • The Create an account and legal links point to example.com placeholders.

Bundled components and licences

Everything the template needs is inside the download; nothing is loaded from the network.

  • Geist typeface — OFL-1.1 (assets/fonts/geist-LICENSE.txt)
  • Lucide icons (inlined SVG) — ISC (documentation/licenses/lucide-LICENSE.txt)

Changelog

Version 1.0.0 · Nov 23, 2026

  • Initial release.