New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details → →
Socket
Book a DemoSign in
Socket

react-plain-slider

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-plain-slider

Simple slider for your React project with Typescript support đź‘‹

latest
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Project Name

A simple draggable react slider component with typescript support.

Getting Started

These instructions will show you how to use the slider.

Installation

To install and set up the library, run:

$ npm install react-plain-slider

Example

App.tsx

import "./App.css";

import { Slider, Slide } from "react-plain-slider";

const App = () => {
  return (
    <div className="app">
      <Slider width="95%" height="300px">
        <Slide className="awesome-slide">
          <div>1</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>2</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>3</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>4</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>5</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>6</div>
        </Slide>
        <Slide className="awesome-slide">
          <div>7</div>
        </Slide>
      </Slider>
    </div>
  );
};

export default App;

App.css

.app {
  background: #f5efe6;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app .awesome-slide {
  background: #aebdca;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
}

.app .awesome-slide > div {
  background: #7895b2;
  width: 75%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  font-weight: bold;
  border-radius: 15px;
  color: #aebdca;
}

Options

Slider

OptionTypeIs requiredDescription
widthstringTrue'px' or '%' values
------------
heightstringTrue'px' or '%' values
------------
classNamestringFalseclassname of outer div
------------
innerClassNamestringFalseclassname of inner div

Slide

OptionTypeIs requiredDescription
classNamestringFalseclassname of slide

Built With

  • React
  • Typescript

Authors

  • Kulizon

Keywords

react

FAQs

Package last updated on 14 Oct 2022

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