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 🙏

© 2025 – Pkg Stats / Ryan Hefner

horizontal-scroll-plus

v1.8.0

Published

## 概述

Downloads

8

Readme

horizontal-scroll-plus

概述

horizontal-scroll-plus 组件是一个用于实现水平滚动效果的 Vue3 组件。它允许用户在固定高度和宽度的容器中水平滚动内容,支持可选的包装样式。

特性

  • 自适应宽度和高度
  • 可选包装元素
  • 响应式设计,支持窗口大小调整
  • 隐藏默认滚动条以提供更干净的外观

安装与使用

npm install horizontal-scroll-plus

使用示例

<template> 
    <horizontal-scroll-plus>
      // 未使用 wrapper ,需要父盒子包裹,并且 flex
      <div style="cursor: pointer; display: flex">
        <div style="width: 300px; height: 200px; background-color: red; flex-shrink: 0">1</div>
        <div style="width: 500px; height: 200px; background-color: blue; flex-shrink: 0">1</div>
        <div style="width: 500px; height: 200px; background-color: black; flex-shrink: 0">1</div>
      </div>
    </horizontal-scroll-plus>

    <horizontal-scroll-plus width="600px" height="200px" wrapper>
       // 使用 wrapper ,不需要盒子包裹, wrapper 已经默认占据 100% 空间
      <div style="width: 300px; height: 200px; background-color: red; flex-shrink: 0">1</div>
      <div style="width: 500px; height: 200px; background-color: blue; flex-shrink: 0">1</div>
      <div style="width: 500px; height: 200px; background-color: black; flex-shrink: 0">1</div>
    </horizontal-scroll-plus>
</template>

<script>
import horizontalScroll from "horizontal-scroll-plus"

export default {
  components: {
    horizontalScroll
  }
}
</script>

Props

| Prop | Type | Default | Description | | --------------- | -------- | ------- | ---------------------------------------------- | | width | Number | String | "100%" | 容器宽度,可以是数字或字符串(如 "300px")。 | | height | Number | String | "100%" | 容器高度,可以是数字或字符串(如 "200px")。 | | wrapper | Boolean | false | - 是否启用包裹元素。 wrapper 为 true 生效 | | wrapper-style | - Object | - {} | - 包裹元素自定义样式对象。wrapper 为 true 生效 | | wrapper-class | - String | - "" | - 包裹元素自定义类名。wrapper 为 true 生效 |

通过以上文档,你可以轻松地集成并使用这个水平滚动组件。如果有任何问题,请随时提出!