Documentation
Formkit — HTML & CSS Form Templates Pack
Version 1.0.0 · Vanilla HTML · 9 files · 71 KB
Getting started
- Unzip the download and open index.html in a browser. No server, installation or build step is needed.
- Edit the text directly in the HTML files.
- Change colours, fonts and spacing through the CSS custom properties at the top of assets/css/style.css.
- Replace the artwork in assets/images/ with your own images.
- Upload the whole folder to any static host.
File structure
The download contains these 9 files:
- LICENSE.txt1.6 KB
- README.md2.4 KB
- assets/css/style.css21 KB
- assets/fonts/inter-LICENSE.txt4.4 KB
- assets/fonts/inter-latin-wght-normal.woff247 KB
- assets/images/favicon.svg353 B
- assets/js/main.js11 KB
- documentation/index.html12 KB
- index.html24 KB
Colours
These custom properties are defined at the top of the stylesheet. Change a value once and it updates everywhere it is used.
--accent#3b82f6--accent-strong#2563eb--accent-soft#eff6ff--z-50#fafafa--z-100#f4f4f5--z-200#e4e4e7--z-300#d4d4d8--z-400#a1a1aa--z-500#71717a--z-600#52525b--z-900#18181b--c-error#b91c1c--c-error-soft#fef2f2--c-ok#047857--c-ok-soft#ecfdf5
Interactive features
Accent switcher
ACCENTS in assets/js/main.js maps each swatch to --accent, --accent-strong and --accent-soft. To fix one colour permanently, set those three variables in :root in style.css and remove the switcher.
Validation rules
Add data-v="required email" and data-msg="First message|Second message" to any control inside a .kit-form. Available rules: required, email, min8, min10, zip, checked, date-future, after:<id>.
Search filter
Edit the PRODUCTS array in main.js to change the demo catalogue; the form re-renders the list on every input.
Settings save bar
The Save button enables when the serialised switches and sliders differ from the last saved snapshot. Post the form values to your API where snapshotSettings() is called.
Customisation notes
Copy a single pattern
Each pattern is one article in index.html with its own form. Copy the article and the matching styles; shared field, button and control styles live in sections 4 to 6 of style.css.
Add a validation rule
Add a case to ruleFails() in main.js and use its name in data-v. The message is the matching entry in data-msg.
Change radius and spacing globally
--r-sm, --r-md and --r-lg and the --sp-* scale in :root drive every control; change them once to make the kit rounder or denser.
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.
- All eight forms validate and show a result message in the browser only; nothing is sent or stored.
- The search pattern filters a built-in list of eight demo products.
Bundled components and licences
Everything the template needs is inside the download; nothing is loaded from the network.
- Inter typeface — OFL-1.1 (
assets/fonts/inter-LICENSE.txt)
Changelog
Version 1.0.0 · Nov 23, 2026
- Initial release.