npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dschen/slidy

v1.0.6

Published

Slidy is a simple npm package that allows you to create customizable sliders for your web projects.

Downloads

18

Readme

Slidy NPM Package Installation Guide

Slidy is a simple npm package that allows you to create customizable sliders for your web projects. This guide will walk you through the process of installing and configuring Slidy for your website.

Installation

1. Importing Slidy

First, you need to import the index.js file into your JavaScript file. This is the main file that will initialize Slidy for your project.

import slidy from './node_modules/@dschen/slidy/index.js';

slidy.init();

export default {};

2. Adding Scripts and Styles

Next, you'll need to include your JavaScript file at the bottom of your HTML file and link the required CSS styles in the <head> section.

<!DOCTYPE html>
<html>
  <head>
    <!-- Add other meta tags, title, etc. here -->

    <link rel="stylesheet" href="./node_modules/@dschen/slidy/lib/styles/styles.css">

    <!-- Add other CSS files and styles here -->
  </head>
  <body>
    <!-- Your page content -->

    <script type="module" src="index.js"></script>
  </body>
</html>

Make sure to replace index.js with the path to your JavaScript file containing the Slidy import and initialization.

Configuration

To use Slidy on your web page, you need to add specific classes to your HTML elements. These classes enable Slidy to identify and transform the content into a slider.

<div class="slidy">
  <div class="slidy-stage">
    <article class="slidy-item article card">
      <!-- Add your slider content here (e.g., images, text, etc.) -->
    </article>
    <!-- Add more .slidy-item elements for additional slides -->
  </div>
  <div>
    <button class="slidy-previous">
      <!-- Add the text for the "previous slide" button here -->
    </button>
    <div class="slidy-indicators">
      <!-- Add this element if you want to display slider indicators -->
    </div>
    <button class="slidy-next">
      <!-- Add the text for the "next slide" button here -->
    </button>
  </div>
</div>

Replace the example content inside the .slidy-item element with your own images, text, or any other content you wish to showcase within the slider.

And that's it! With these simple steps, you can now install and configure the Slidy npm package to create stunning sliders for your web projects. Enjoy using Slidy and make your website more interactive and engaging with this fantastic slider tool.

CSS Classes Reference

Below is a list of CSS classes used by Slidy along with their descriptions:

| CSS class | Needed | Description | | ----------------- | -------- | --------------------------------------------------------------------------------------------- | | .slidy | yes | HTML wrapper that enclosures every element responsible for the slider (eg. navigation buttons) | | .slidy-stage | yes | HTML where the slides live | | .slidy-item | yes | HTML wrapper that enclosures the slide HTML. | | .slidy-indicators | optional | HTML wrapper where the slider indicators will appear if needed | | .slidy-next | optional | HTML <button> to skip to the next slide | | .slidy-previous | optional | HTML <button> to skip to the previous slide |