Socket
Book a DemoInstallSign in
Socket

vue-scrolling-ul

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scrolling-ul

auto scrolling ul list

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

vue-scrolling-ul

vue-scrolling-ul vuejs nodejs blog

This is a Vue component that provides a list of ul that scrolls automatically.

Run Simple Demo

$ git clone https://github.com/SuperYesifang/vue-scrolling-ul.git
$ cd vue-scrolling-ul
$ npm install
$ npm run dev

Usage

1. Global Use in Vue-Cli Project

  • main.js
import Vue from "vue";
import ScrollingUl from "vue-scrolling-ul";

Vue.use(ScrollingUl);

new Vue({
	el: "#app",
	render: h => h(App)
});
  • App.vue
<template>
	<div id="app">
		<scrolling-ul>Some LI Tags ...</scrolling-ul>
	</div>
</template>
omit...

2. Direct Use in Vue-Cli Project

  • App.vue
<template>
	<div id="app">
		<scrolling-ul>Some LI Tags ...</scrolling-ul>
	</div>
</template>

<script>
	import ScrollingUl from "vue-scorlling-ul";

	export default {
		name: "App",
		components: {
			ScrollingUl
		}
		omit...
	};
</script>

Options

Some Vue prop options to config ScrollingUl.

propdescriptiontypedefault
smmothTurn on smooth scrollingBooleantrue
infinityTurn on infinite scrollingBooleantrue
barConfigure virtual scroll barbarOptions{show:'auto'}
speedScrolling speed (unit: pixel/ms, remark: Must be a positive number)Number30
delayScrolling gap time (unit: ms, remark: Only when smooth equals false,Must be a positive number)Number3000
niceTurn on customizes the CSS style and cancels the default styleBooleanfalse

barOptions

Type: Object

propertydescriptiontypedefault
showTurn on virtual scroll barBoolean | "auto""auto"
styleCustom CSS style of virtual scroll barObject/

More Custom Style

If you want to customize more styles using CSS.You can use the following className.

classNamedescription
scrolling-nice-barthe visual bar when normal
scrolling-nice-bar.barShowthen visual bar when show
scrolling-nice-ulthe scrolling ul list when normal
scrolling-nice-ul.barthen scrolling ul list when visual bar is enabled

Keywords

vue

FAQs

Package last updated on 21 Oct 2021

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