HextaUIHextaUI
/Components/Marketing

Brand Scroller

A scroller for brands or logos.

Preview

Spotify

YouTube

Amazon

Google

Spotify

YouTube

Amazon

Google

Spotify

YouTube

Amazon

Google

Spotify

YouTube

Amazon

Google

This component is available on 21st.dev.

Code

global.css
@theme {
  //
  --animate-marquee: marquee 30s linear infinite;
  --animate-marqueeY: marqueeY 200s linear infinite;

  @keyframes marquee {
    0% {
      transform: translateX(0%);
    }
    100% {
      transform: translateX(calc(-100% - var(--gap)));
    }
  }
  @keyframes marqueeY {
    0% {
      transform: translateY(0%);
    }
    100% {
      transform: translateY(calc(-100% - var(--gap)));
    }
  }
  //
}
BrandScroller.tsx
"use client";

import { BsAmazon, BsGoogle, BsSpotify, BsYoutube } from "react-icons/bs";

export const BrandScroller = () => {
  return (
    <>
      <div className="group flex overflow-hidden py-2 [--gap:2rem] [gap:var(--gap)] flex-row max-w-full [--duration:40s] [mask-image:linear-gradient(to_right,_rgba(0,_0,_0,_0),rgba(0,_0,_0,_1)_10%,rgba(0,_0,_0,_1)_90%,rgba(0,_0,_0,_0))]">
        {Array(4)
          .fill(0)
          .map((_, i) => (
            <div
              className="flex shrink-0 justify-around [gap:var(--gap)] animate-marquee flex-row"
              key={i}
            >
              <div className="flex items-center w-28 gap-3">
                <BsSpotify size={24} />
                <p className="text-lg font-bold">Spotify</p>
              </div>
              <div className="flex items-center w-28 gap-3">
                <BsYoutube size={24} />
                <p className="text-lg font-bold">YouTube</p>
              </div>
              <div className="flex items-center w-28 gap-3">
                <BsAmazon size={24} />
                <p className="text-lg font-bold">Amazon</p>
              </div>

              <div className="flex items-center w-28 gap-3">
                <BsGoogle size={24} />
                <p className="text-lg font-bold">Google</p>
              </div>
            </div>
          ))}
      </div>
    </>
  );
};
Edit on GitHub

Last updated on