New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@helga-agency/slider

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helga-agency/slider

Simple slider for scrollable panes

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Slider

Simple slider for scrollable panes. Does

  • support scroll buttons (previous/next) anywhere in the DOM
  • update scroll button visibility depending on scroll position
  • make sure that an active element is visible on initialization

Polyfills

  • Use a scrollIntoView and scrollBy polyfill if needed

Example

<div class="back"></div>
<slider-component
    data-previous-button-selector=".back"
    data-next-button-selector=".forward"
    data-disabled-button-class-name="disabled"
    data-active-content-selector=".active"
>
    <div class="element">Test</div>
    <div class="element">Test</div>
    <div class="element">Test</div>
    <div class="element active">Test</div>
    <div class="element">Test</div>
</slider-component>
<div class="forward"></div>

<script type="module" src="@joinbox/slider/SliderElement.js"></script>

Components

Slider Component

Exposed Element

<slider-component></slider-component>

Attributes
  • data-previous-button-selector (optional): CSS selector for the button that scrolls to the previous view. The button may be placed anywhere in the DOM.
  • data-next-button-selector (optional): See data-previous-button-selector, but for the next view.
  • data-disabled-button-class-name (optional): Class name that should be added to buttons that are disabled (depending on the scroll position; if the scroll position is 0, this class will be added to the previous button, as user cannot scroll any more towards the previous view).
  • data-active-content-selector (optional): CSS selector for the active element; the element must be a child of <slider-component> and will be scrolled into view on initialization.

FAQs

Package last updated on 09 Dec 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc