marquee
kibo-ui-registry/marqueeFreeComponent
Marquees are a great way to show a list of items in a horizontal scrolling motion.
Live preview
live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.kibo-ui.com/r/marquee.jsonSource
1"use client";23import type { HTMLAttributes } from "react";4import type { MarqueeProps as FastMarqueeProps } from "react-fast-marquee";5import FastMarquee from "react-fast-marquee";6import { cn } from "@/lib/utils";78export type MarqueeProps = HTMLAttributes<HTMLDivElement>;910export const Marquee = ({ className, ...props }: MarqueeProps) => (11 <div12 className={cn("relative w-full overflow-hidden", className)}13 {...props}14 />15);1617export type MarqueeContentProps = FastMarqueeProps;1819export const MarqueeContent = ({20 loop = 0,21 autoFill = true,22 pauseOnHover = true,23 ...props24}: MarqueeContentProps) => (25 <FastMarquee26 autoFill={autoFill}27 loop={loop}28 pauseOnHover={pauseOnHover}29 {...props}30 />31);3233export type MarqueeFadeProps = HTMLAttributes<HTMLDivElement> & {34 side: "left" | "right";35};3637export const MarqueeFade = ({38 className,39 side,40 ...props41}: MarqueeFadeProps) => (42 <div43 className={cn(44 "absolute top-0 bottom-0 z-10 h-full w-24 from-background to-transparent",45 side === "left" ? "left-0 bg-gradient-to-r" : "right-0 bg-gradient-to-l",46 className47 )}48 {...props}49 />50);5152export type MarqueeItemProps = HTMLAttributes<HTMLDivElement>;5354export const MarqueeItem = ({ className, ...props }: MarqueeItemProps) => (55 <div56 className={cn("mx-2 flex-shrink-0 object-contain", className)}57 {...props}58 />59);
What it pulls in
npm packages
Files it writes
More from Kibo UI Registry
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| announcementannouncement | Kibo UI Registry | Components | Free | no deps | |
| avatar-stackavatar-stack | Kibo UI Registry | Components | Free | no deps | |
| bannerbanner | Kibo UI Registry | Components | Free | 2 deps | |
| calendarcalendar | Kibo UI Registry | Components | Free | 3 deps | |
| choiceboxchoicebox | Kibo UI Registry | Components | Free | 2 deps | |
| code-blockcode-block | Kibo UI Registry | Components | Free | 5 deps · 2 files | |
| color-pickercolor-picker | Kibo UI Registry | Components | Free | 3 deps | |
| comboboxcombobox | Kibo UI Registry | Components | Free | 2 deps |
