1.0.6 • Published 2 years ago

@ximu/simple-carousel v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

simple-carousel

npm npm bundle size npm

基于 react 的 轮播图, 在线 demo

Installation

npm install @ximu/simple-carousel --save

Usage

import React from "react";
import { render } from "react-dom";

import MyComponent from "@ximu/simple-carousel";
import "@ximu/simple-carousel/dist/index.css";

const airpods = require("@ximu/simple-carousel/examples/assets/airpods.png");
const iphone = require("@ximu/simple-carousel/examples/assets/iphone.png");
const tablet = require("@ximu/simple-carousel/examples/assets/tablet.png");
const data = [
	{
		title: ["Buy a Tablet or xPhone for college.", "Get airPods."],
		desc: [],
		style: {
			color: "#212121",
			backgroundImage: airpods,
		},
	},
	{
		title: ["xPhone"],
		desc: ["Lots to love. Less to spend.", "Starting at $399"],
		style: {
			color: "#fff",
			backgroundImage: iphone,
		},
	},
	{
		title: ["Tablet"],
		desc: ["Just the right amount of everything"],
		style: {
			color: "#212121",
			backgroundImage: tablet,
		},
	},
];
const App = () => <MyComponent data={data} width={700} height={400} delay={3000} speed={500} />;
render(<App />, document.getElementById("root"));

License

MIT © 2022 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago