Skip to content

shadcn.io is not affiliated with official shadcn/ui

Shadcn Marquee for React Radix UI

Scrolls items in a horizontal container.

Framework
UI library

Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/radix/marquee.json

Anatomy

Marquee
├── MarqueeContent
│   └── MarqueeViewport
├── MarqueeEdge
└── MarqueeItem

Usage

import { AppleIcon } from "@/components/icons/apple";
import { ChatGptIcon } from "@/components/icons/chat-gpt";
import { ClaudeIcon } from "@/components/icons/claude";
import { GoogleIcon } from "@/components/icons/google";
import { NextIcon } from "@/components/icons/next";
import { ReactIcon } from "@/components/icons/react";
import { ViteIcon } from "@/components/icons/vite";
import { VueIcon } from "@/components/icons/vue";
import { Card, CardContent } from "@/components/ui/card";
import {
  Marquee,
  MarqueeContent,
  MarqueeItem,
} from "@/components/ui/marquee";
const MarqueeDemo = () => (
  <Marquee>
    <MarqueeContent>
      {items.map((Icon, index) => (
        <MarqueeItem key={index}>
          <Card className="[--space:--spacing(8)]">
            <CardContent>
              <Icon className="size-10" />
            </CardContent>
          </Card>
        </MarqueeItem>
      ))}
    </MarqueeContent>
  </Marquee>
);

const items = [
  GoogleIcon,
  AppleIcon,
  NextIcon,
  ChatGptIcon,
  ClaudeIcon,
  ViteIcon,
  VueIcon,
  ReactIcon,
];

Accessibility

KeyDescription
End
Go to the end.

Demos

Autofill

Custom Speed

Fade

Orientation Horizontal

Orientation Vertical

Pause On Hover

Reverse

Spacing

API Reference

Marquee

div

PropType
AttributeType
CSS variableType
--marquee-delaystring
--marquee-durationstring
--marquee-loop-countstring
--marquee-spacingstring
--marquee-translatestring

MarqueeViewport

div

PropType
AttributeType
CSS variableType
--marquee-delaystring

MarqueeContent

div

PropType
childrenReactNode
AttributeType
CSS variableType
--marquee-delaystring

MarqueeEdge

div

PropType
AttributeType

MarqueeItem

div

PropType
AttributeType