AlbumArtwork() — ui Function Reference
Architecture documentation for the AlbumArtwork() function in album-artwork.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD c9807a72_da3a_4ab9_6654_e0cedf256297["AlbumArtwork()"] c131b0f2_30cc_26c0_60da_6ff8d0a57400["album-artwork.tsx"] c9807a72_da3a_4ab9_6654_e0cedf256297 -->|defined in| c131b0f2_30cc_26c0_60da_6ff8d0a57400 style c9807a72_da3a_4ab9_6654_e0cedf256297 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/app/(app)/examples/music/components/album-artwork.tsx lines 26–95
export function AlbumArtwork({
album,
aspectRatio = "portrait",
width,
height,
className,
...props
}: AlbumArtworkProps) {
return (
<div className={cn("space-y-3", className)} {...props}>
<ContextMenu>
<ContextMenuTrigger>
<div className="overflow-hidden rounded-md">
<Image
src={album.cover}
alt={album.name}
width={width}
height={height}
className={cn(
"h-auto w-auto object-cover transition-all hover:scale-105",
aspectRatio === "portrait" ? "aspect-[3/4]" : "aspect-square"
)}
/>
</div>
</ContextMenuTrigger>
<ContextMenuContent className="w-40">
<ContextMenuItem>Add to Library</ContextMenuItem>
<ContextMenuSub>
<ContextMenuSubTrigger>Add to Playlist</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-48">
<ContextMenuItem>
<PlusCircle className="mr-2 h-4 w-4" />
New Playlist
</ContextMenuItem>
<ContextMenuSeparator />
{playlists.map((playlist) => (
<ContextMenuItem key={playlist}>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
className="mr-2 h-4 w-4"
viewBox="0 0 24 24"
>
<path d="M21 15V6M18.5 18a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM12 12H3M16 6H3M12 18H3" />
</svg>
{playlist}
</ContextMenuItem>
))}
</ContextMenuSubContent>
</ContextMenuSub>
<ContextMenuSeparator />
<ContextMenuItem>Play Next</ContextMenuItem>
<ContextMenuItem>Play Later</ContextMenuItem>
<ContextMenuItem>Create Station</ContextMenuItem>
<ContextMenuSeparator />
<ContextMenuItem>Like</ContextMenuItem>
<ContextMenuItem>Share</ContextMenuItem>
</ContextMenuContent>
</ContextMenu>
<div className="space-y-1 text-sm">
<h3 className="font-medium leading-none">{album.name}</h3>
<p className="text-xs text-muted-foreground">{album.artist}</p>
</div>
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does AlbumArtwork() do?
AlbumArtwork() is a function in the ui codebase, defined in deprecated/www/app/(app)/examples/music/components/album-artwork.tsx.
Where is AlbumArtwork() defined?
AlbumArtwork() is defined in deprecated/www/app/(app)/examples/music/components/album-artwork.tsx at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free