MeDo

Generatore di Card IA.

Descrivi cosa contiene la card e MeDo genera il contenitore completo — slot media, header, body e footer, elevazione in hover, immagini bloccate con aspect-ratio, altezze uguali in griglia e uno stato skeleton coordinato.

Card
Card

Una card è un contratto di layout, non una scatola con un bordo

Angoli arrotondati e un'ombra si scrivono in un minuto, così le card vengono considerate banali. Ciò che si rompe è tutto quello che le circonda. Una card ha un titolo su due righe e la vicina su quattro, e i footer non si allineano più. Arriva un'immagine con un rapporto inaspettato e la griglia si ricompone dopo il paint. Qualcuno rende cliccabile l'intera card e intrappola un pulsante "Salva" dentro l'anchor, producendo HTML non valido e un controllo irraggiungibile. Queste sono proprietà della card all'interno di un insieme, non della card da sola: ecco perché generare il contenitore, il vincolo del media, l'allineamento del footer e lo stato di caricamento come un'unica unità è più utile che stilizzare bene un singolo div.

6 modelli

Modelli di Card che puoi generare

Ogni modello è un prompt reale, non uno screenshot. Copialo in qualsiasi editor IA, oppure eseguilo in MeDo e ottieni codice React + Tailwind.

BasicSlots + Skeleton

Four-Slot Card With a Matching Skeleton

The container everything else extends. Generating the skeleton in the same pass is what keeps the two the same size six months later.

Create a card component with four optional slots: media at the top, a header with title and subtitle, a body for description text, and a footer for actions or metadata. White surface, 12px radius, 1px light grey border, 20px internal padding. Make the card a flex column with the body allowed to grow so the footer sits at the bottom and cards in a row stay equal height regardless of title wrapping. Lock the media to a 16:9 ratio with object-fit cover and explicit dimensions. Include a skeleton variant whose grey blocks match the real layout exactly — same media ratio, same line count, same footer height — so nothing shifts when data arrives.

Prova in MeDo
CommerceProduct Card

Image, Price and Add to Cart

The hardest card to get right because it needs a whole-card link and a nested button. Wrap the card in an anchor and the button becomes invalid markup and unreachable.

Create a product card: a 1:1 image with object-fit cover and a reserved box, an optional discount badge in the top-left, the product name over two lines with a line clamp, a price row with the current price and a struck-through original, a star rating with a review count, and an Add to cart button in the footer. Make the whole card navigate to the product page by putting the anchor on the product name and stretching it over the card with an absolutely positioned pseudo-element, then raise the cart button above it with a higher z-index so both targets work. Add an out-of-stock state that dims the image and swaps the button for a Notify me control.

Prova in MeDo
EditorialArticle Card

Cover Image, Headline and Byline

One headline wraps to two lines and its neighbor to four. Without a growing body the bylines end up on different baselines and the whole index looks unfinished.

Create an article card: a 16:9 cover image with a reserved aspect box, a category badge, a headline clamped to two lines, an excerpt clamped to three, and a footer row with an author avatar, author name, publish date and read time. Make it a flex column with the excerpt allowed to grow so bylines align across a row of cards with different headline lengths. Put the anchor on the headline and stretch it across the card so the accessible name is the headline rather than "read more". Add a featured variant that spans two grid columns with the media on the left and the text on the right.

Prova in MeDo
DashboardMetric Card

Stat Card With Delta and Sparkline

No media, all typography. The number is the component, so lock its width with tabular figures or the whole row twitches on every poll.

Create a metric card for a dashboard: a small uppercase label, a large numeric value using tabular figures so the width does not jitter as the number updates, a change indicator showing the delta with an arrow and a green or red tint, and an optional sparkline across the bottom. Never rely on color alone for direction — pair the tint with an arrow glyph and a visually hidden "up" or "down". Reserve the sparkline height even before data arrives. Include a loading variant that shows a shimmering block at the exact value height, and an empty state reading "No data yet" rather than a zero that looks like a real measurement.

Prova in MeDo
ConversionPricing Card

Plan Card With a Highlighted Tier

Three cards that must end on one line. If the highlighted tier gets a thicker border, compensate with padding or it will sit one pixel taller than its neighbors.

Create a pricing card: plan name, price with a billing period suffix, a one-line positioning sentence, a feature list with check icons, and a call-to-action button pinned to the bottom. Add a highlighted variant with a thicker border, a "Most popular" badge overlapping the top edge, and reduced internal padding so the extra border width does not make it taller than the adjacent cards. Make the card a flex column with the feature list growing, so buttons across three plans of different feature counts land on the same line. Keep the price in tabular figures and mark the currency and period as separate spans for annual and monthly toggling.

Prova in MeDo
InteractiveClickable Card

Whole-Card Link With Nested Controls

The pattern that fixes the most common card bug. One stretched anchor, real controls layered above it, no interactive element nested inside another.

Create a fully clickable card that stays valid HTML: put a single anchor on the card title and expand it over the whole card with an absolutely positioned ::after pseudo-element covering the container, rather than wrapping the card in an anchor. Give the container position relative and any nested control — a bookmark toggle, an overflow menu, a secondary link — a higher z-index plus position relative so it remains clickable. Drive the hover elevation from the container so hovering anywhere raises the card, and mirror it on focus-within so keyboard users see the same state. Skip the translate transform when prefers-reduced-motion is set and keep the shadow change.

Prova in MeDo

Come personalizzare il tuo Card

Blocca l'aspect-ratio del media

Chiedi un aspect-ratio esplicito sull'area immagine con object-fit cover. Senza un box riservato, immagini di dimensioni variabili ridimensionano la card dopo il caricamento, un colpo diretto al Cumulative Layout Shift e il difetto più visibile in una griglia di card.

Fissa il footer in basso

Specifica che la card è una colonna flex con il body libero di crescere, così i footer si allineano lungo la riga anche quando i titoli occupano un numero diverso di righe. Righe di azioni irregolari sono il modo più rapido per far sembrare incompiuta una griglia altrimenti pulita.

Scegli una sola strategia di click

O l'intera card è un link o lo sono gli elementi al suo interno, mai entrambi. Per una card completamente cliccabile, chiedi un singolo anchor sul titolo esteso sulla card con uno pseudo-elemento in posizione assoluta: il nome accessibile resta significativo e rimane spazio per controlli annidati al di sopra.

Chiedi lo skeleton insieme alla card

Richiedi una variante di caricamento i cui blocchi grigi corrispondano alle dimensioni reali, incluso il rapporto del media e il numero di righe. Uno skeleton costruito con misure diverse vanifica lo scopo, perché il layout salta comunque nel momento in cui arrivano i dati.

Chi usa il componente Card

Griglia prodotti e-commerce

Un'immagine prodotto quadrata, nome, prezzo e una riga di valutazione, con un pulsante "Aggiungi al carrello" nel footer posto sopra un link che copre l'intera card verso la pagina prodotto, così entrambi i target funzionano senza annidamento.

Indice di blog o risorse

Un'immagine di copertina 16:9, un badge categoria, un titolo che va a capo su due righe, un estratto e un footer con autore e tempo di lettura che si allinea lungo la riga indipendentemente dalla lunghezza dei titoli.

Dashboard SaaS

Card di metriche senza alcun media: un'etichetta, un valore grande, un indicatore di variazione e uno sparkline, renderizzate come skeleton al primo paint mentre la query si risolve.

Confronto prezzi o piani

Tre card di altezza uguale con una evidenziata da un bordo più spesso e un badge, ognuna che termina con un pulsante call-to-action ancorato in basso così che i pulsanti stiano su un'unica linea.

Pattern di Card per siti web diversi

Lo stesso componente card, calibrato sul tipo di sito su cui viene pubblicato.

01 / 06

SaaS Dashboard Cards

Metric cards with no media at all, so the number carries the whole layout. Use tabular figures and reserve the value height, because a card grid fed by a polling query will otherwise reflow every few seconds. Borders beat shadows here — twelve elevated cards on one screen read as noise rather than hierarchy.

Stili e varianti di Card

Scegli la variante che si adatta al resto della pagina, poi generala.

01 / 06

Bordered Card

A 1px border, no shadow. The right default for dense interfaces — tables, dashboards, settings panels — where every card needs an edge but none of them should appear to float. Keep the border one step darker than the divider color or the card dissolves into the page.

Card in React, Next.js, Vue e Svelte

React, Next.js, Vue 3, SvelteKit, Astro o HTML puro: lo stesso card, sei modi per integrarlo.

01 / 06

React Card

Expose the slots as subcomponents — Card.Header, Card.Body, Card.Footer — rather than as props, so a metric card can omit the media without passing null. No state means no hooks, which is what lets you render sixty of them in a grid.

src/components/Card.tsx

export function Card({ className, ...props }) {
  return (
    <div
      className={cn(
        'flex flex-col rounded-xl border bg-white p-5',
        'transition-shadow hover:shadow-lg',
        className
      )}
      {...props}
    />
  )
}
Card.Footer = ({ children }) => <div className="mt-auto pt-4">{children}</div>

Come aggiungere il tuo Card a un progetto

Quattro passaggi, dalla scelta di un modello di card alla messa in produzione.

01~30s

Pick a Card Template

Scan the six templates and start from the content you are displaying — product with a cart button, article with a byline, metric with a delta, or pricing tier.

02~10s

Copy the Prompt

Take the prompt into MeDo, Lovable, Bolt, v0 or Cursor. Say what grid the card lives in before you run it, because the column count is what determines the media ratio and the equal-height rules.

03~1min

Generate and Refine

You get React + Tailwind back with a live preview. Follow up in plain English — "clamp the title to two lines", "swap the shadow for a border", "add the skeleton" — instead of editing the flex utilities by hand.

04~2min

Drop It Into the Grid

Render it inside a CSS grid so rows stretch to match, then check a row where one title wraps and another does not. That is the case that reveals whether the footer is actually pinned.

Domande comuni su Card

Come genero un componente card con l'IA?

Descrivi cosa contiene la card e come verrà usata, per esempio "card prodotto con immagine quadrata, titolo, prezzo e footer di aggiunta al carrello, in una griglia a tre colonne". MeDo genera la struttura degli slot, il vincolo del media e lo stato hover insieme. Menzionare la griglia è importante, perché è ciò che determina le regole di altezza uguale e di aspect-ratio.

Quali sono le parti di un componente card?

Quattro regioni coprono quasi ogni caso: un'area media opzionale, un header con il titolo e un'eventuale etichetta di supporto, un body per il contenuto descrittivo e un footer per azioni o metadati. Trattarle come slot opzionali anziché markup obbligatorio permette a un solo componente di servire come card prodotto, card articolo e card metrica senza varianti dedicate.

L'intera card può essere cliccabile?

Sì, ma non avvolgere la card in un anchor se contiene pulsanti o altri link, perché annidare elementi interattivi è HTML non valido e i browser lo gestiscono in modo imprevedibile. Metti l'anchor sul titolo ed estendilo sulla card con uno pseudo-elemento posizionato in modo assoluto, poi porta ogni controllo annidato al di sopra con uno z-index più alto.

Come rendo le card della stessa altezza in una griglia?

Usa una griglia CSS, che già estende gli elementi di una riga per farli corrispondere, e rendi la card stessa una colonna flex così che il suo footer venga spinto in basso da un body che cresce. Le altezze fisse sono la soluzione sbagliata, perché tagliano il contenuto appena un titolo va a capo su una riga in più.

Le card dovrebbero usare un'ombra o un bordo?

Un bordo si legge meglio in interfacce dense come dashboard e tabelle, dove molte ombre creano rumore visivo. Un'ombra si adatta a layout di marketing arieggiati dove le card devono staccarsi dal fondo. Scegline uno come predefinito e riserva l'altro a una variante sollevata o in evidenza anziché mescolarli allo stesso livello.

Una card ha bisogno di uno skeleton di caricamento?

Qualsiasi card alimentata da una richiesta di rete ne beneficia, perché uno skeleton dimensionato sul contenuto reale evita che la pagina si ricomponga all'arrivo dei dati. Chiedi a MeDo lo skeleton nello stesso prompt della card e i due condivideranno le dimensioni per costruzione, cosa difficile da mantenere quando vengono scritti separatamente.