Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cute-clever-carousel

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cute-clever-carousel

js carousel

  • 0.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
382
increased by16.46%
Maintainers
1
Weekly downloads
 
Created
Source

This library doesn't have much function as yet. Rather than a carousel, it is a scroll box with a grid.

Sample

https://noradium.github.io/cute-clever-carousel/sample/dist

Usage

Install

$ npm install --save cute-clever-carousel

HTML Markup

<div class="carousel">
	<div class="ccc-frame">
		<div class="ccc-items">
			<img src="https://placehold.jp/150x200.png?text=1" alt="">
			<img src="https://placehold.jp/150x200.png?text=2" alt="">
			<!-- ... -->
		</div>
	</div>
</div>

Required styles

.ccc-frame {
	overflow: hidden;
}
.ccc-items {
	position: relative;
	white-space: nowrap;
}
.ccc-items > * {
	display: inline-block;
}

js

import Carousel from 'cute-clever-carousel';

new Carousel(document.getElementsByClassName('carousel')[0], {/* options */});

Options

see src/Options.ts

APIs

interfacereturn value
hasNextbooleanwhether it has the next item
hasPrevbooleanwhether it has the prev item
reset()voidinitialize grid
prev()voidslide to prev item if exists
next()voidslide to next item if exists
destroy()voidremove all event listeners

Development

$ npm run watch

$ cd sample
$ sudo npm run start
$ open http://localhost

Test

$ npm test

Keywords

FAQs

Package last updated on 14 Dec 2020

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