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

qwik-slider

v1.1.0

Published

A simple and customizable slider for Qwik

Downloads

119

Readme

Pheno Agency

qwik-slider

Hey there! 👋 Thanks for checking out the qwik-slider, a simple and customizable way to add horizontal scrolling to your web pages.

Installation

To get started, you'll need to install package if you haven't already. You can do this with npm.

npm install qwik-slider

Usage

Now that you're all set up, let's see how you can use the Slider component to add scrollable content to your website.

import { Slider } from "qwik-slider";

export const MyComponent = component$(() => {

  return(
    <Slider>
      <div class="card">Card 1</div>
      <div class="card">Card 2</div>
      <div class="card">Card 3</div>
    </Slider>
  )
}

You can pass in various options to customize the behavior of your slider. Here are some of the available options:

| Option | Default value | Description | | --------------- | ------------- | ----------------------------------------- | | scrollSpeed | 1 | Adjust the scroll speed | | gap | 15 (px) | Set the gap between items | | showScrollbar | true | Control the visibility of the scrollbar | | autoScroll | false | Enable or disable auto-scrolling | | autoScrollSpeed | 15 | Adjust the speed of auto-scrolling | | width | "" | Adjust the width of the slider | | styleClass | "" | Styling the slider by providing the class |

Customization

Feel free to style your slider by applying the CSS class name to the slider component. You can also pass in a settings object to configure your slider in one place:

import { Slider } from "qwik-slider";

export const MyComponent = component$(() => {

  const sliderSettings = {
    scrollSpeed: 5,
    gap: 20,
    showScrollbar: false,
    autoScroll: true,
    autoScrollSpeed: 10,
  }

return (
  <Slider {...sliderSettings}>
    <Cards /> // your cards go here
  </Slider>
)
};

Pause on Hover

If you want your slider to pause when someone hovers their mouse over it, you're in luck! The Slider component has got you covered. Just hover your mouse over it, and it will pause. Move the mouse away, and it will start scrolling again.

Looping

By default, your slider content will loop back to the start when it reaches the end. It's like an endless cycle, so your users won't miss a thing.

Contributing

We welcome contributions from the developer community to help improve and enhance this package.


And that's it! The Slider component is a great way to add a dynamic and interactive element to your website. Have fun customizing and making your web pages scroll-tastic!

Happy coding! 🚀