Nutro Docs

Ecommerce Components

Ecommerce Components

Exclusive ready to use e-commerce components to power your business

Note:

  • All the below are react components

  • In your react projects, install the dependancies using npm (or) yarn

In case of npm

npm i nutro-components

In case of yarn

yarn add nutro-components

Quantity control button

One of the most common component - quantity control button to add/remove items

add number hovered
import { QuantityButton } from "nutro-components";
<QuantityButton />;

Switch/Toggle

Veg/Non veg toggle component

switch switch-active
PropdescriptiontypeValueDefault
stateactive state of switchbooleanfalse, truefalse
import { EcomToggle } from "nutro-components";
<EcomToggle />;

Image magnifier

Zoom in images for preview

zoom-inactive zoom-active
PropdescriptiontypeValueDefault
imagespass 2 images of 687 & 1200pxarray--
isHintEnabledshow hint for usersbooleantrue/falsefalse
import { ImageMagnify } from "nutro-components";
// replace the path with your image folder paths
import watchImg687 from './lib/components/Ecommerce/images/wristwatch_687.jpeg';
import watchImg1200 from './lib/components/Ecommerce/images/wristwatch_1200.jpeg';
const images = [watchImg687, watchImg1200]
<ImageMagnify images={images} isHintEnabled={true} />

Slider components

Product slider components - card slider, enlarged preview slider

preview-slider

card-slider
PropdescriptiontypeValueDefault
slideimagespass list of images to be added to the sliderarray--
dotshow dots indicatorbooleantrue/falsefalse
previewshow dots indicatorbooleantrue/falsefalse
autoplayautoplay timings in secondsnumber-null
sizesmall/large sliderstringsm, lgsm
import { Slider } from "nutro-components";
// replace the path with your image folder paths
/* slider related imports */
import styles from './lib/components/Ecommerce/slider/slider.module.css'
import Slider from './lib/components/Ecommerce/slider/ProductSlider'
import ShoeOne from './lib/components/Ecommerce/slider/images/shoe1.jpg'
import ShoeTwo from './lib/components/Ecommerce/slider/images/shoe2.jpg'
import ShoeThree from './lib/components/Ecommerce/slider/images/shoe3.jpg'
import ShoeFour from './lib/components/Ecommerce/slider/images/shoe4.jpg'
import ShoeFive from './lib/components/Ecommerce/slider/images/shoe5.jpg'
// list of images for the slider
const slideimages = [ShoeOne, ShoeTwo, ShoeThree, ShoeFour, ShoeFive]
//card slider section
<div className = {styles.card}>
<Slider
size = "sm"
slideimages = {slideimages}
autoplay = {3}
dot = {true}
/>
<div className = {styles.cardcontent}>
<h4 className={styles.heading}>SHOES</h4>
<p className = {styles.cardtext}>Sed ut perspiciatis unde omnis iste natus sit voluptatem accusantium doloremque
laudantium, totam rem aperiam. </p>
</div>
<div className = {styles.footer}>
<button>SHOP NOW 🥾</button>
</div>
</div>
// enlarge preview slider section
<div className = "big-slider">
<Slider
size = "lg"
slideimages = {slideimages}
autoplay = {3}
dot = {true}
preview = {true}/>
</div>

Product Card

Product information card with pricing details & quantity button

card card-veg card-nv

Note: The image enlarges with slight transition when hovered

Demo product object

const product = {
image: BurgerImage,
name: "Butter Paneer Kulcha Burger",
isVeg: false,
description: "557 Cal | High protein",
actualPrice: "₹ 209",
discountedPrice: "₹ 104",
};
import { ProductCard } from "nutro-components";
// replace the path with your image folder paths
import BurgerImage from './lib/components/Ecommerce/images/burger.jpeg'
const product = {
image: BurgerImage,
name: 'Butter Paneer Kulcha Burger',
isVeg: false,
description: '557 Cal | High protein',
actualPrice: '₹ 209',
discountedPrice: '₹ 104'
}
<ProductCard product={product} />
Edit this page on GitHub