UI / Decor
Generative Cover
Grainy gradient cover art drawn from any string. The same title always gets the same cover, so empty covers never look empty.
Installation
npx shadcn@latest add https://jiaweing.com/r/generative-cover.jsonWith the @jiaweing namespace set up, use @jiaweing/generative-cover in place of the URL.
Usage
tsx
import { GenerativeCover } from "@/components/generative-cover";tsx
<div className="aspect-[3/4] w-40 overflow-hidden rounded-xl">
<GenerativeCover seed="The Pragmatic Programmer" />
</div>Props
GenerativeCover
| Prop | Type | Default | Description |
|---|---|---|---|
| seed | string | - | Any string, like a title. The same seed always draws the same cover. |
| className | string | - | Extra classes. By default it fills its parent. |
MIT licensed. Copy it, change it, ship it.