cssscript.com

Minimal Clean Presentation Library For Web – make-slides

The make-slides JavaScript library transforms a group of content sections into a responsive, minimal, pretty clean presentation (full page slider) with navigation arrows and bottom progress bar. How to use it: Insert sectioned content into the document. <div class="make-slides"> <section>Slide 1</section> <section>Slide 2</section> <section>Slide 3</section> ... </div> Download and insert the make-slides.js script into the document. <script src="./js/make-slides.js"></script> Initialize...

cssscript.com

Convenient Emoji Picker In Vanilla JavaScript – Emoji Button

Emoji Button is a pure JS emoji picker where the users can quickly search and select emoji from a categorized emoji picker popup. It also provides a Recent Used tab that shows the recently picked emoji. How to use it: Import the Emoji Button into the document. <script src="https://cdn.jsdelivr.net/npm/emoji-button@latest/dist/index.min.js"></script> Create an emoji button next to the input field. <input type="text"> <button id="emoji-button"></button> Attach the emoji picker to the input field....

cssscript.com

CSS Only Laptop Device Template

A pure CSS laptop mockup/template designed to showcase anything in an ASCII art laptop device. How to use it: Import the stylesheet laptop.css into the HTML. <link href="laptop.css" rel="stylesheet" /> Wrap your design to be showcased in the CSS laptop. <div class="laptop"> <img src="https://source.unsplash.com/aK5Dt6L6_hQ/400x300"> </div> Adjust the laptop size. Possible sizes: laptop-sm laptop-lg <div class="laptop-sm"> <img...

cssscript.com

Full-featured Dynamic Data Grid In Vanilla JavaScript – jsdatatable

jsdatatable is a simple JavaScript plugin to dynamically render a data table from any data defined in the JavaScript or JSON. With support for sorting, pagination, live search, cell editing and much more. How to use it: To get started, include the jsdatatable’s JavaScript and Stylesheet on the page. <link rel="stylesheet" href="./src/simple-table.css" /> <script src="./src/simple-table.js"></script> Create an empty table on the page. <table id="table"> <thead style="cursor:...

cssscript.com

Full-featured Slider/Carousel Plugin – Splide

Splide is a lightweight, responsive, accessible, mobile-friendly, full-featured slider/carousel plugin implemented in pure JavaScript and CSS/CSS3. More features: Touch-enabled. Supports both touch swipe and mouse drag. Smooth slide & fade transitions based on CSS3. Image lazy loading. Supports nested sliders. Allows multiple items on a slide. Autoplay. RTL mode. Horizontal and vertical directions. Basic usage: Install and import the Splide library. # NPM $ npm install @splidejs/splide --save import splide from...

cssscript.com

Lightweight Offcanvas Push Navigation In JavaScript – pusha

pusha is a lightweight JavaScript plugin to create an off-canvas side menu that slides out from the left/right/top/bottom of the screen while pushing the page content to the other side. More features: Close on ESC. Close on click outside. Disable body scroll when the menu is opened. Custom styles via SCSS. How to use it: Import the compiled JavaScript and CSS files into the HTML page. <link rel="stylesheet" href="dist/css/pusha-demo.min.css" /> <script src="dist/js/pusha.min.js"></script> Create the...

cssscript.com

Share Selected Text On Twitter

Yet another script that allows the visitor to select and share any part of your text content on Twitter. How to use it: Add the CSS class selectable-text-area to the text blocks. <div class="selectable-text-area"> Any Content Here </div> Apply CSS styles to the floating Twitter share icon above the ext selection. #twitter-share-btn { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; color: #56b8f5; background-color: #fff; cursor: pointer; border: 2px solid #56b8f5; border-radius: 50%; position: absolute; ...

cssscript.com

Material Design Inspired Off-canvas Push Nav – Material-Menu

Material-Menu is a pure JavaScript navigation library to create an off-canvas push menu inspired by Material Design apps. How to use it: Insert the main content into a container element with a unique ID ‘wrapper’. <div id="wrapper" class="wrapper"> ... Main Content Here ... </div> Create a hamburger button to reveal the off-canvas menu. <button id="mm-menu-toggle" class="mm-menu-toggle">Toggle Menu</button> Create the off-canvas menu from a nav list. <nav id="mm-menu"...

cssscript.com

Fix Color Banding In Gradient Background Using Noisy-Gradient Library

Noisy-Gradient is a JavaScript library created to fix the color banding by adding noise to the gradient background using WebGL. With a fallback to <canvas> when the browser doesn’t support WebGL. How to use it: Place the main JavaScript at the end of the HTML document. <script src=js-noisy-gradient.js></script> Generate a gradient image. var stops = [ '#112233', '#223344' ]; var opts = { }; // NoisyVerticalGradient(width, height, stops, opts) var png = (new NoisyVerticalGradient(400, 600, stops, opts)).render_png(); Apply the...

cssscript.com

Advanced Password Strength Indicator – pswmeter

pswmeter is a simple yet highly customizable password strength indicator which can be used to help a user type a secured password. The plugin adds a progress bar style password strength indicator to the password field and automatically updates bar colors to represent the current password score. Default Password Strength Requirments: At least 9 characters. Contains uppercase and lowercase letters. Contains numbers. How to use it: Download and put the minified version of the pswmeter library in the document. <script...

cssscript.com

Display Loading Status As A Favicon

A script that makes use of JavaScript and Canvas to draw a square & circular loading spinner as a favicon displayed in the browser tab. Useful for intuitively displaying the current loading progress (download, upload, image load, etc…) as an animated favicon. How to use it: Create an HTML5 canvas element for the animated favicon. <canvas id='example' width='32' height='32'></canvas> The example JS to create a circular loading spinner. onload = function() { cv = document.querySelector('#cvl'), ctx = cv.getContext('2d'); ...

cssscript.com

Lightweight Mobile App Navigation System – mmenu-light

mmenu-light is a light version of the mmenu plugin that makes it easier to create off-canvas hamburger navigation just like the native mobile app. No dependencies, no extensions, no addons. Easy to implement a pretty clean and mobile-friendly navigation system in your web app just in a minute. How to use it: Import the stylesheet mmenu-light.css and JavaScript mmenu-light.js into the HTML. <link rel="stylesheet" href="./dist/mmenu-light.css" /> <script src="./dist/mmenu-light.js"></script> Create an...

cssscript.com

Manipulate The Position Of Elements Using Placement.js Library

Placement.js is an alternative to the Popper.js that provides a simple way to manage the position of an element (e.g. popup, tooltip, popover, dropdown, etc) relative to other elements. How to use it: Install the package and import the Placement.js module. # NPM $ npm install placement.js --save import placement from 'placement.js'; Initialize the placement and pass the following parameters: anchor: anchor element popup: popup element to position side: ‘top’, ‘bottom’, ‘left’, or ‘right’ align: ‘start’, ‘center’, or...

cssscript.com

Fancy Submit Button Interactions

Fancy Submit Button Interactions that displays a loading spinner (w/ or w/o progress bar) in the submit button when submitting and shows a success message when a specific process is completely finished. How to use it: Create submit buttons. <div class="submit-buttons"> <div class="submit-buttons__block"> <h4 class="submit-buttons__title">Submit 1</h4> <div class="submit-buttons__content"> <button class="submit-button submit-button--1"...

cssscript.com

Momentum Scrolling Effect For Mouse Wheel – magic-scroll

Want to have a mobile app like swipe-to-scroll effect on the desktop? magic-scroll is a vanilla JavaScript library that applies a momentum scrolling effect to the webpage when scrolling down/up with mouse wheel. How to use it: Install the magic-scroll package. # NPM $ npm install magic-scroll.js --save Import the magic-scroll module. import MagicScroll from "./MagicScroll.js"; Or load the MagicScroll.cjs.js script in the page. <script src="MagicScroll.cjs.js"></script> Apply the MagicScroll to the target scrollable...

cssscript.com

Generate Random Phrases, Adjectives, And Nouns – phraseGen.js

phraseGen.js is a Vanilla JavaScript word generator that helps developers generate random phrases, adjectives, and nouns with custom separators in the document. How to use it: Download and insert the phraseGen.js JavaScript library into the document. <script src="./lib/phraseGen.js"></script> Generate random phrases using the randPhrase() method and specify the length & separator. length: the number of phrases to generate outputType: spaces, no-spaces, or dashes randPhrase(length, outputType); Generate random subjectives...

cssscript.com

Sakura Falling Effect In Vanilla JavaScript – sakura.js

This is the vanilla JS version of the jQuery Sakura plugin that applies a fast smooth animated falling sakura petals effect using CSS animations and requestAnimationFrame API. How to use it: Import the sakura.css and sakura.js into the HTML page. <link rel="stylesheet" href="dist/sakura.css" /> <script src="dist/sakura.js"></script> Apply the falling sakura petals effect to a container element you specify. var sakura = new Sakura('body', { // options here }); Customize the color of sakura petals. var...

cssscript.com

8 Single Element Loading Spinners In Pure CSS – SpinBolt

SpinBolt is a collection of 7 minimal, clean, circular, animated loading spinners implemented in single element and CSS/CSS3. Loading Spinners Included: Circle Dual Circle Path Ripple Seven Circles Clock Puzzle Pushing Shapes How to use it: Download import the Loading Spinners as per your needs. @import 'variables'; @import 'sbl-circ'; @import 'sbl-circ-path'; @import 'sbl-circ-dual'; @import 'sbl-circ-ripple'; @import 'sbl-seven-circles'; @import 'sbl-meter'; @import 'sbl-puzzle'; @import 'sbl-pushing-shapes'; Or directly include the...

cssscript.com

Convert Select Box Into A Fully Styleable Dropdown List – Selectal.js

Selectal.js is a JavaScript plugin to replace the regular select box that enables you to style & control dropdown lists in a simple way. How to use it: Load the stylesheet selectal.min.css for the default styling of the dropdown list. <link rel="stylesheet" href="./dist/selectal.min.css" /> Import the main JavaScript file in the document. <script src="./dist/selectal.min.js"></script> Initialize the Selectal on the target select element. Done. <select id="my-select"> <option...

cssscript.com

Accessible SEO-friendly Accordion In JavaScript – Vanilla-Js-Accordion

A lightweight, accessible, SEO-friendly accordion component built using vanilla JS, HTML unordered list and ARIA attribute. How to use it: Insert the core JavaScript and CSS files into the page. <link rel="stylesheet" href="css/vanilla-js-accordion.css"> <script src="js/vanilla-js-accordion.js"></script> Load the theme CSS in the page (not necessary). <link rel="stylesheet" href="css/vanilla-js-accordion-theme.css"> Create an HTML list for the accordion. Some important notes: This...

cssscript.com

Touch-enabled 360 Image Preview In JavaScript – Threesixty

Threesixty is a JavaScript library that generates a draggable, touch-enabled 360 product viewer from a sequence of images defined in a sprite image (or an image array). Your users can rotate the product images with mouse drag, arrow keys, touch-swipe event, etc. How to use it: To get started, you first need to insert your product images at different angles into a sprite image or an image array. myImg = [ '1.jpg', '2.jpg', '3.jpg', ... ], Then download and insert the Threesixty.js script into the document. <script...

cssscript.com

Magnify And Zoom Images Using JavaScript And CSS3

A tiny script that applies a magnifying glass effect to an image and allows the user to zoom in/out the image with mouse wheel. How to use it: Insert the thumbnail and original image to the page. <div class="image"> <a href="original.jpg" target="_blank"> <img src="thumbnail.jpg" alt=""> </a> </div> Create the HTML for the magnifying glass effect. <div class="zoom"> <img class="zoom-image" src="" alt=""> </div> The...