• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Normform: A tiny CSS plugin to make your web forms beautiful again

Normform 2.0

Normform: A tiny CSS plugin to make your web forms beautiful again Form plugin (6KB)

Check out the demos

How to use

  1. Download normform.min.css (or normform.css if you wish to customize)
  2. Add the following to your project
<link rel="stylesheet" href="path-to-norform-folder/normform.min.css">
  1. Add the normform class to your form element
  2. Enjoy your forms!

Documentation

Most structuring questions can be answered by simply taking a look at the included index.html file for the proper way to build your form(s) for the best results.

Fieldsets & Legends

It is completely optional to use fieldset and/or legend, but to do so is very simple:

<fieldset>
    <legend>This is a legend</legend>
    {inner form content goes here}
</fieldset>

Inputs

The text, email, password, and number inputs all follow the structure of label > input.

Example:

<label for="text-input">Text Input:</label>
<input type="text" id="text-input" value="" placeholder="Text input content...">

Select Dropdowns

Default browser select styling is reset and Normform uses a custom div to represent the dropdown contents:

<label for="select-choice-2">Dropdown Select Choice:</label>
<div class="select-dropdown">
    <select name="select-choice-2" id="select-choice">
        <option value="Choice 1">Choice 1</option>
        <option value="Choice 2">Choice 2</option>
        <option value="Choice 3">Choice 3</option>
    </select>
</div>

Radios & Checkboxes

Radio and checkbox elements follow the structure of input > label. The default browser radios and checkboxes are hidden and replaced with custom elements.

<input type="radio" name="radio-choice" id="radio-choice-1" tabindex="6" value="choice-1" checked>
<label for="radio-choice-1">Choice 1</label>
<input type="checkbox" name="checkbox-1" id="checkbox-1">
<label for="checkbox-1">Checkbox 1</label>

Textareas

Straightforward:

<label for="textarea">Textarea:</label>
<textarea rows="8" name="textarea" id="textarea"></textarea>

Submit & Reset 'Buttons'

Inputs set with a default type of submit or reset will be automatically styled. If you wish to have both buttons inline with each other, simply group them inside an inline-buttons parent element:

<div class="inline-buttons">
    <input type="reset" value="Cancel">
    <input type="submit" value="Sign up">
</div>

Error Descriptors

Adding input validation is as simple as including the required attribute but if you wish to include additonal error descriptor you need to also include the requirements element and place all values inside a parent div:

<div>
    <label for="password-input">Password Input:</label>
    <input type="password" id="password-input" required  value="" tabindex="3" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" placeholder="Secure password">
    <div class="requirements">Your password must be at least 6 characters as well as contain at least one uppercase, one lowercase, and one number.</div>
</div>

That's it! Enjoy, and if you have any feature request or notice any bugs - please open a ticket!

More Repositories

1

1mb-club

An exclusive members-only club for web pages weighing less than 1 megabyte
HTML
330
star
2

ET-Jekyll

A minimal Jekyll theme inspired by Tufte CSS
HTML
141
star
3

vanilla-css

A minimal baseline stylesheet for any web project
HTML
110
star
4

typesafe-css

Minimal CSS optimized for reading and writing
63
star
5

phpetite

PHPetite (/p/h/pəˈtēt/) is a single file, static blog generated from PHP
PHP
28
star
6

john-doe-jekyll

The John Doe template converted into a Jekyll theme
CSS
27
star
7

lightspeed

An insanely fast and performance-based Jekyll theme
HTML
26
star
8

html5-valid-badge

HTML5 valid badge for your website (PNG & SVG formats)
25
star
9

stacks-11ty

Open source 11ty theme with personality
HTML
22
star
10

taunt-jekyll

Minimal blogging theme for jekyll.
CSS
22
star
11

data-11ty

An open source 11ty theme designed for reporting & data-visualization
HTML
20
star
12

eleventy-taunt

Custom 11ty portfolio theme for designer & developer blogs.
HTML
18
star
13

1kb.club

An exclusive members-only club for web pages weighing less than 1 kilobyte
HTML
15
star
14

cssgraphs

A collection of pure CSS graphs with a graceful mobile fallback
CSS
14
star
15

super-pseudo

Using pure CSS pseudo elements to render all page content
CSS
11
star
16

blog-anonymously

Some very basic instructions on how to blog anonymously (not fool-proof by any means)
CSS
9
star
17

writxt-jekyll

The official Jekyll theme for the SMS-based blogging platform Writxt
HTML
7
star
18

opentype

A public package CDN for open typefaces that have no other place on the web to call home
CSS
6
star
19

wyf

Simple CSS "plugin" for toggle-styled figure elements (Watch Your Figure)
HTML
5
star
20

accssible

My personal blog built with Jekyll
CSS
5
star
21

mao-css

An ever expanding CSS guideline. There aren't enough of these already right?
4
star
22

dribbble-shot

A skeleton HTML & CSS project used to create Dribbble shots
CSS
4
star
23

flexbox-bar-graphs

Pure CSS bar graphs with a graceful mobile fallback
HTML
3
star
24

notez

Browser-based note taking app with built in local storage and export functionality
CSS
2
star
25

tdarb-soupault

My personal website built using the Soupault SSG
HTML
1
star
26

slam-dunks

My collection of personal Dribbble shots
HTML
1
star
27

CSS-Bar-Graph

A simple pure CSS bar graph with a graceful mobile fallback
CSS
1
star
28

cookingwith.casa

The official website for Cassandra's recipes
HTML
1
star
29

CSS-Dot-Plot-Graph

A simple pure CSS dot plot graph with a graceful mobile fallback
CSS
1
star
30

linux-setup

Instructions for my preferred Linux desktop when setting up a new device
1
star