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

nlnd-slider

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlnd-slider

A slider for more smooth scrolling

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

NLND SLider

This is a React component that provides a nice looking scrolling view. On scrolling, it will smooth scroll to the next component as such:

Installation

just do

npm install nlnd-slider

or

yarn add nlnd-slider

Example

This example is the one used in the demo above:

import React from "react";
import { Slider, Slide } from "nlnd-slider";
import { SlideA, SlideB, SlideC } from "./Components/SlideA";

const App = () => (
  <div>
    <Slider>
      <Slide>
        <SlideA />
      </Slide>
      <Slide>
        <SlideB />
      </Slide>
      <Slide>
        <SlideC />
      </Slide>
    </Slider>
  </div>
);

Each of the child components (SlideA, SlideB and SlideC) are simply a component to be shown in the slide. Here's how SlideA looks for example:

const SlideComponent = styled.div`
  background-color: ${(props: SlideProps) => props.background};
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
`;

const SlideA = () => {
  return (
    <SlideComponent background="#4784e6">
      <Contents style={{ fontSize: "3vw" }}>Hello</Contents>
    </SlideComponent>
  );
};

Authors

Ali Rezaee (ipinlnd): nlndipi@hotmail.com

Keywords

FAQs

Package last updated on 23 Feb 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