Brand Section
BrandSection component is designed to display a horizontally scrolling list of brands in a visually engaging manner.
Installation
npx @ayushmxxn/serenity-ui@latest add brandsection
Usage
'use client'
import React from 'react';
import BrandScrollSection from './components/ui/BrandSection';
import { FaApple, FaMicrosoft, FaGoogle, FaAmazon, FaFacebook, FaTwitter, FaLinkedin, FaInstagram } from 'react-icons/fa';
const Brands = [
{ name: 'Apple', logo: FaApple },
{ name: 'Microsoft', logo: FaMicrosoft },
{ name: 'Google', logo: FaGoogle },
{ name: 'Amazon', logo: FaAmazon },
{ name: 'Facebook', logo: FaFacebook },
{ name: 'Twitter', logo: FaTwitter },
{ name: 'LinkedIn', logo: FaLinkedin },
{ name: 'Instagram', logo: FaInstagram },
];
const App = () => {
return (
<BrandSection brands={Brands} scrollSpeed={0.1} scrollInterval={30}/>
);
};
export default App;
Props
Prop Name | Type | Description |
---|---|---|
name | string | name of the company |
logo | string | IconType | logo of the company |
scrollSpeed | number | Controls the speed at which the brands scroll horizontally. |
scrollInterval | number | Defines the interval (in milliseconds) at which the scroll position updates. |