Socket
Socket
Sign inDemoInstall

hy-image-slider-react

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hy-image-slider-react

Image Slider For React


Version published
Maintainers
1
Install size
6.58 kB
Created

Readme

Source

Modules Images Slider for React v.1.0.0

ReactJS modules are simple but have many advantages, one of which is that you can customize them freely.

NPM Installation

npm install hy-image-slider-react

Example Project Implemented

// Add - Impport module //
import Slider from 'hy-image-slider-react';
//----//

const App = () => {
  return (
    <div>
    
      // Add - Default components //
      <Slider interval={1000} images={['banner-1.jpg', 'banner-1.jpg', 'banner-1.jpg']}/>
      //----//
      
    </div>
  );
};

export default App;

Customization

AtributeKeyDescriptionStatus
images={key?}['banner-1.jpg', 'banner-1.jpg', 'banner-1.jpg']Insert image (local/url)Required
interval={key?}500 1000 3000 etc...Set interval timeRequired
width={key?}600 1000 1500 etc...Set width (px)Optional
height={key?}600 1000 1500 etc...Set height (px)Optional
objectFit="key?"fill contain cover scale-down noneSet Image ObjectOptional
hoverStop={key?}true falseImage stops on hoverOptional
borderRadius={key?}0 10 25 etc...Set corner radius imageOptional
hideButton={key?}true falseHide/Show buttonOptional
buttonTextNext="key?"Any textSet text button (Next)Optional
buttonTextPrev="key?"Any textSet text button (Prev)Optional
classSlider="key?"Use class cssCSS Slider ContainerOptional
classImg="key?"Use class cssCSS Slider imagesOptional
classButtonMain="key?"Use class cssCSS Slider Button ContainerOptional
classButton="key?"Use class cssCSS Slider ButtonOptional

Full Customization

<Slider 
    classSlider="mycss-slider" 
    classImg="mycss-slider-image" 
    classButtonMain="mycss-slider-button-container"
    classButton="mycss-slider-button" 
    buttonTextPrev="Prev" 
    buttonTextNext="Next"
    hideButton={false}
    borderRadius={25}
    hoverStop={true}
    objectFit="cover"
    height={500}
    width={1000}
    interval={3000}
    images={['my-image-1.jpg', 'my-image-2.jpg', 'my-image-3.jpg']}
/>

Structural Components

<div classSlider="...">
    </img classImg="..." />
    <div classButtonMain="...">
        <button classButton="..." />
        <button classButton="..." />
    </div>
</div>

Happy Coding :)

Follow Me: FOLLOW

Keywords

FAQs

Last updated on 07 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc