Media Card

An Interactive media cards with a fluid cursor and a polished, modern aesthetic.

Loading...

Installation

npx shadcn@latest add @scrollxui/media-card 

Usage

import { MediaCard, MediaCardItem } from '@/components/ui/media-card';
<MediaCard
  className='w-full min-h-87.5 flex items-center justify-center p-10'
  dotClassName='bg-blue-500 w-4 h-4'
  marqueeClassName='bg-blue-500/95 text-white'
>
  <MediaCardItem
    src='https://www.pexels.com/download/video/1390942/'
    alt='Video'
    title='Lost in the view.'
    type='video'
    className='w-full max-w-sm'
  />
</MediaCard>

Examples


Image

Loading...

API Reference

Media Card

An Interactive media cards with a fluid cursor and a polished, modern aesthetic.

Props

PropertyTypeDefaultDescription
classNamestring
Custom class for the media card container.
dotClassNamestring
Styles applied to the cursor dot.
marqueeClassNamestring
Styles applied to the marquee cursor.
springConfig{ stiffness?, damping?, mass? }-
Spring physics configuration for cursor motion.
marqueeSpeednumber10
Speed of the marquee text animation.
marqueeDelaynumber0.5
Delay before marquee animation starts.
childrenReactNoderequired
MediaCardItem components.

Built withby Ahdeetai.