New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

throw-slider

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

throw-slider

Slider with throw effect. All credit goes to GSAP https://codepen.io/GreenSock/pen/ExdyYed

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

throw-slider

Slider with throw effect

All credit goes to GSAP https://codepen.io/GreenSock/pen/ExdyYed

Usage

Install

npm i throw-slider

Import

import 'throw-slider'

Use

<throw-slider>
    <div>
        <img src="https://picsum.photos/800/600?random=1" alt="slide 1">
    </div>
    <div>
        <img src="https://picsum.photos/300/400?random=2" alt="slide 2">
    </div>
    <div>
        <img src="https://picsum.photos/800/300?random=3" alt="slide 3">
    </div>
    <div>
        <img src="https://picsum.photos/800/600?random=4" alt="slide 4">
    </div>
    <div>
        <img src="https://picsum.photos/600/600?random=5" alt="slide 5">
    </div>
    <div>
        <img src="https://picsum.photos/800/600?random=6" alt="slide 6">
    </div>
    <div>
        <img src="https://picsum.photos/800/600?random=7" alt="slide 7">
    </div>
    <div>
        <img src="https://picsum.photos/800/600?random=8" alt="slide 8">
    </div>
    <div>
        <img src="https://picsum.photos/800/600?random=9" alt="slide 9">
    </div>
</throw-slider>

Options

AttributeTypeDefaultDescription
autoplayBooleanfalseAutomatically moves
speedNumber1Speed of the autoplay. Higher is faster
notDraggableBooleanfalseRemove the dragging option
centerBooleanfalseActive element is the one in the center of the container rather than the left edge
noRepeatBooleanfalseStop looping
reversedBooleanfalseMoves in reverse
noSnapBooleanfalseDon't snap on items
noPauseOnHoverBooleanfalseDon't pause autoplay on hover
throwResistanceNumber3500Throw resistance, default is 3500

Events

interface ThrowEvent {
  currentItem: HTMLElement;
  currentIndex: number;
}

"onChange": (event: CustomEvent<ThrowEvent>) => void;

Keywords

slider

FAQs

Package last updated on 29 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts