7

GitHub - idriskhenchil/Fort.js: A modern progress bar for form completion.

 1 year ago
source link: https://github.com/idriskhenchil/Fort.js
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Fort.js

A modern progress bar for form completion. Check out the demo!

68747470733a2f2f69647269736b68656e6368696c2e636f6d2f666f72742f64656d6f2e676966

Getting Started

1. Add JS file

<script src="https://cdn.jsdelivr.net/npm/@idriskhenchil/[email protected]/dist/fort.min.js"></script>

2. Create a form

<form class="fort">
    <input type="text" placeholder="Name">
    <input type="email" placeholder="Email">
</form>

3. Call Fort with your desired effect, target class, and color(s)

new Fort('.fort').solid("#6638F0");

Ignoring fields:

Add the fort-ignore class to a field to ignore it from counting towards the progress.

<input type="text" placeholder="Name" class="fort-ignore">

Effects

Changing the colors:

  • Solid - Fort('.target').solid("#009DFF")

  • Gradient - Fort('.target').gradient("#009DFF", "#47B9FF") Note: Only pass two color values.

Contributing

Please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgements

Fort.js is authored and maintained by Idris Khenchil


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK