Skip to content
HTML Templates For Developers

Documentation

Sixdigit — OTP Verification Form

Version 1.0.0 · Vanilla HTML · 15 files · 88 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 15 files:

  • LICENSE.txt1.3 KB
  • README.md2.6 KB
  • assets/css/style.css13 KB
  • assets/fonts/chakra-petch-LICENSE.txt5.3 KB
  • assets/fonts/chakra-petch-latin-400-normal.woff29.5 KB
  • assets/fonts/chakra-petch-latin-500-normal.woff29.7 KB
  • assets/fonts/chakra-petch-latin-600-normal.woff29.7 KB
  • assets/fonts/chakra-petch-latin-700-normal.woff29.7 KB
  • assets/fonts/dm-mono-LICENSE.txt4.8 KB
  • assets/fonts/dm-mono-latin-400-normal.woff214 KB
  • assets/fonts/dm-mono-latin-500-normal.woff215 KB
  • assets/images/favicon.svg461 B
  • assets/js/main.js7.5 KB
  • documentation/index.html12 KB
  • index.html5.8 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-bg#0b1120
  • --color-panel#101a2e
  • --color-panel-2#16223b
  • --color-line#24344f
  • --color-line-strong#36496a
  • --color-text#cbd5e1
  • --color-muted#94a3b8
  • --color-white#ffffff
  • --color-cyan#06b6d4
  • --color-cyan-bright#22d3ee
  • --color-cyan-ink#04202a
  • --color-danger#fda4af
  • --color-danger-strong#f43f5e
  • --color-ok#4ade80

Interactive features

Code inputs

The number of boxes is the LENGTH constant in assets/js/main.js; add or remove .otp__digit inputs in index.html to match and keep their data-index values in order.

Verification

Replace the comparison inside submitForm() with a request to your API. Call showError() on failure or swap to the done view on success.

Resend countdown

RESEND_SECONDS sets the cooldown. Request a new code from the resend button's click handler in initResend().

Demo code

DEMO_CODE is the code that succeeds. Delete the aside.demo block in index.html and the initDemo() fill handler before going live.

Customisation notes

Demo code

The correct code is 482913. It is shown in the Demo code box on the page and defined as DEMO_CODE in assets/js/main.js; any other six digits show the error state.

Accent colour

Change --color-cyan and --color-cyan-bright in :root; glow and focus styles derive from them.

Box size

--digit-size controls the width of each code box; it drops to 2.75rem below 400px.

Masked phone number

The masked number in the lede paragraph is static copy; fill it from your server session.

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.

  • No text message is sent, nothing is stored and no real authentication happens: the code is compared with a demo value (482913) in JavaScript.
  • The resend button only restarts the countdown; it does not send anything.

Bundled components and licences

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

  • Chakra Petch typeface — OFL-1.1 (assets/fonts/chakra-petch-LICENSE.txt)
  • DM Mono typeface — OFL-1.1 (assets/fonts/dm-mono-LICENSE.txt)

Changelog

Version 1.0.0 · Nov 23, 2026

  • Initial release.