Create sticky element in flexbox sidebars. it can use in Vanilla JS and frameworks like Vue and React

Overview

js sticky side

simple sticky side with js that can use in frameworks like vue and react.

sticky side with javascript

notes

  • it can be used just in flexbox grids.
  • target element should be parent flexbox and it should have just one child.
  • the child should not have bottom margin.

how to use

install it with this command.

npm i js-sticky-side

import that in your code.

import { sticky } from "js-sticky-side"

create object and use it

var stickySide = new sticky(parentElement, int topOffest, int bottomOffset, int screenWith);

  • parentElement : the parent element that should be flexbox
  • topOffest : sticky child space to top (default 0)
  • bottomOffset : sticky child space to bottom (default 0)
  • screenWith : minimum screen size that sticky should be active (default 0)

example

var stickySide = new sticky(document.querySelector("#sticky-parent"), 80, 20, 768);

window.addEventListener("scroll", stFunction);

function stFunction() {
  stickySide.sticky();
}
You might also like...

Customizable sticky notes for the web. jQuery plugin

Post It All! Customizable sticky notes for the web. jQuery Plugin The jQuery plugin for adding sticky notes in your webpage. http://postitall.txusko.c

Apr 17, 2022

Show floating sticky outline (table of contents) for Notion pages, powered by nbundle.

Notion Outline Show floating sticky outline (table of contents) for Notion pages, powered by nbundle. This is an nbundle-powered Notion app bootstrapp

Nov 10, 2022

šŸ”– lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue

šŸ”– lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue

Tagify - tags input component Transforms an input field or a textarea into a Tags component, in an easy, customizable way, with great performance and

Jan 2, 2023

A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Amuchina A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebW

Sep 17, 2022

This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do any operations that can be performed in python shell with this package.

Django execute code This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do

Nov 12, 2022

This is a dependency-free easy-to-use vanilla JavaScript addon allowing you to create HTML currency inputs with various different currencies and formattings.

intl-currency-input This is a dependency-free easy-to-use vanilla JavaScript addon allowing you to create HTML currency inputs with various different

Jan 4, 2023

Examples and challenges of my video about Creating and testing a complete Node.js Rest API (Without frameworks)

Building a complete Node.js WebApi + testing with no frameworks Welcome, this repo is part of my youtube video about Creating and testing a complete N

Dec 23, 2022
Owner
milad nazari
full stack web programmer
milad nazari
Macaron is an open-source design tool to visually create Web Components, which can be used in most Web frameworks, or in vanilla HTML/JavaScript

Macaron is an open-source design tool to visually create Web Components, which can be used in most Web frameworks, or in vanilla HTML/JavaScript

Macaron 334 Dec 29, 2022
A simple jQuery extension to make any HTML element sticky on scroll.

jquery.sticky.js A simple jQuery extension to make any HTML element sticky on scroll. Installation Just download the script and include it in your HTM

Achal Jain 2 Aug 22, 2022
šŸ“ You Can Create Your Own Short Notes With The Help of Sticky-Notes Website.

Hi ?? , I'm Sneh Agrawal A passionate Web developer from India ?? Iā€™m currently working on Chatting Website Chit-Chat ?? How to reach me on My Gmail A

Sneh (Smilyboyy) 1 Feb 23, 2022
Finer control of the Obsidian sidebars. To be used with an external window manager.

Sidebar Toggler Finer control of the Obsidian sidebars. To be used with an external window manager. What the plugin does It adds four commands for tog

pseudometa 8 Nov 4, 2022
A showcase of problems once hard or impossible to solve with CSS alone, now made trivially easy with Flexbox.

Solved by Flexbox A showcase of problems once hard or impossible to solve with CSS alone, now made trivially easy with Flexbox. View Site Viewing the

Philip Walton 13k Jan 2, 2023
A simple, lightweight Flexbox carousel JavaScript plugin.

FlexCarousel.js A simple, lightweight Flexbox carousel ES6 JavaScript plugin. An unofficial fork of Slick Carousel. Status Getting Started Download th

Tom Hartley 13 Jun 11, 2021
JavaScript micro-library: pass in an element and a callback and this will trigger when you click anywhere other than the element

Add a click listener to fire a callback for everywhere on the window except your chosen element. Installation run npm install @lukeboyle/when-clicked-

Boyleing Point 5 May 13, 2021
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
jQuery Plugin for Sticky Objects

Sticky Sticky is a jQuery plugin that gives you the ability to make any element on your page always stay visible. Sticky in brief This is how it works

Anthony Garand 3.3k Dec 16, 2022