Giter Club home page Giter Club logo

boilerform's Introduction

Boilerform

The Boilerform logo

Boilerform is a little HTML and CSS boilerplate to take the pain away from working with forms.

By providing baseline BEM structured CSS and appropriate attributes on elements: Boilerform gives you a head start building forms in the best possible way with a view to being dropped into most projects.

The idea was first thought-up by @chriscoyier on CSS Tricks.

๐ŸŒ https://boilerform.hankchizljaw.com

Getting started

Boilerform is designed to be straight-forward to implement. In its most basic form, you can drop a CSS file into your head with the following snippet:

<link rel="stylesheet" media="all" href="https://cdn.jsdelivr.net/gh/hankchizljaw/boilerform@master/dist/css/boilerform.min.css?v=1.1.1" />

Then all you need to do is wrap your elements in a .boilerform wrapper. It could be something like this:

<div class="boilerform">
    <!-- Add all of your boilerform elements in here ๐Ÿ‘ -->
</div>

You can also take compiled CSS and HTML from the dist directory of this repository, if that's what you prefer.

If you want a bit more control, you can work with the Sass and Pattern Library. This is where the source of Boilerform lives.

To compile assets, you can run the following commands in your terminal:

  • npm run watch will compile your assets and watch for further changes
  • npm run build will compile your assets into a production ready state in the dist directory

The pattern library is powered by Astrum. You can find detailed documentation here.

Validation interface

There's a basic validation interface available with Boilerform which extends the native HTML validation facility with a few visual tweaks.

Getting started

First of all, you need the JavaScript in your project. You can either take the source code and add to your project, or add the dist version to bottom of your page.

<script src="https://cdn.jsdelivr.net/gh/hankchizljaw/boilerform@master/dist/js/boilerform.min.js?v=1.1.1" async defer></script>

Now that you've got the script, it'll work, as long as your elements have the required attribute, which will allow them to fire an invalid event. You'll also need to make sure your <form> elements either live in a .boilerform parent element or have the .boilerform class.


Made with โค๏ธ by HankChizlJaw and friends.

boilerform's People

Contributors

andy-set-studio avatar nchan0154 avatar pandelisz avatar tcaruth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.