This component no longer exists. It was in deso-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Media Item
deso-ui/media-itemRemovedBlock
An item for displaying a single image or video.
Install it
npx shadcn@latest add https://ui.deso.com/r/media-item.jsonSource
1import * as React from 'react';2import { ImageIcon, PlayCircle, ImagesIcon, LucideIcon, Music } from 'lucide-react';3import { cn } from '@/lib/utils/deso';4import { PostEngagement } from './post-engagement';56export type MediaType = 'image' | 'video' | 'audio' | 'carousel';78interface MediaItemProps {9 imageUrl: string;10 mediaType: MediaType;11 viewCount: number;12 showStats?: boolean;13 onClick?: () => void;14 className?: string;15}1617const mediaTypeConfig: {18 [key in MediaType]: {19 Icon: LucideIcon;20 };21} = {22 image: { Icon: ImageIcon },23 video: { Icon: PlayCircle },24 audio: { Icon: Music },25 carousel: { Icon: ImagesIcon },26};2728export const MediaItem = ({29 imageUrl,30 mediaType,31 viewCount,32 showStats = true,33 onClick,34 className,35}: MediaItemProps) => {36 const { Icon } = mediaTypeConfig[mediaType];3738 return (39 <button40 onClick={onClick}41 className={cn(42 'group relative w-full overflow-hidden shadow-md transition-transform duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2',43 className44 )}45 >46 <img47 src={imageUrl}48 alt="Media content"49 className="h-full w-full object-cover transition-opacity duration-200 group-hover:opacity-90"50 />51 <div className="absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-100 transition-opacity" />5253 <div className="absolute bottom-4 left-4 z-10 opacity-100 transition-opacity">54 <Icon className="h-5 w-5 text-white drop-shadow-md" />55 </div>5657 {showStats && (58 <div className="absolute bottom-4 right-4 z-10 opacity-100 transition-opacity">59 <PostEngagement60 variant="view"61 count={viewCount}62 className="text-white drop-shadow-md"63 />64 </div>65 )}66 </button>67 );68};
What it pulls in
Other registry items
