MeDo

AIカードジェネレーター。

カードに何を入れるかを説明すれば、MeDoがコンテナ全体を生成します — メディア・ヘッダー・ボディ・フッターのスロット、ホバー時のエレベーション、aspect-ratioで固定された画像、グリッド内で揃う高さ、そして対応するスケルトン状態まで。

カード
カード

カードはボーダー付きの箱ではなく、レイアウトの契約です

角丸とシャドウは1分で書けるため、カードは些細なものだと扱われがちです。壊れるのはカードの周囲すべてです。あるカードのタイトルは2行、隣は4行で、フッターの位置が揃わなくなります。想定外の比率の画像が届き、ペイント後にグリッドが再配置されます。誰かがカード全体をクリック可能にし、「保存」ボタンをアンカー内に閉じ込めてしまい、無効なHTMLと到達できないコントロールが生まれます。これらはカード単体ではなく、集合の中のカードの性質です。だからこそ、コンテナ、メディアの制約、フッターの整列、ローディング状態を一つのまとまりとして生成することが、単一のdivをうまくスタイリングするより役立つのです。

6 個のテンプレート

生成できる カード テンプレート

どのテンプレートもスクリーンショットではなく実際のプロンプトです。任意の AI エディタに貼り付けるか、MeDo で実行して 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.

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.

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.

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.

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.

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.

MeDoで試す

カード をカスタマイズする方法

メディアのaspect-ratioを固定する

画像領域に明示的な aspect-ratio と object-fit cover を指定しましょう。予約された領域がないと、寸法の異なる画像が読み込み後にカードをリサイズします。これは Cumulative Layout Shift への直撃であり、カードグリッドで最も目立つ欠陥です。

フッターを下端に固定する

カードをフレックスの縦並びにし、ボディが伸びられるように指定しましょう。そうすればタイトルの折り返し行数が異なっても、行全体でフッターが揃います。アクション行のばらつきは、きれいなグリッドを未完成に見せる最短ルートです。

クリック方式を1つに絞る

カード全体をリンクにするか、内部の要素をリンクにするか、どちらか一方だけにします。カード全体をクリック可能にするなら、タイトルに置いた単一のアンカーを絶対配置の疑似要素でカード全体に広げてください。アクセシブルな名前が意味を保ちつつ、その上に入れ子のコントロールを置く余地も残ります。

スケルトンをカードと同時に依頼する

グレーのブロックが実際の寸法(メディアの比率や行数を含む)と一致するローディングバリアントを求めましょう。サイズの異なるスケルトンでは意味がありません。データが届いた瞬間にレイアウトが跳ねてしまうからです。

カード コンポーネントを使うのは誰か

Eコマースの商品グリッド

正方形の商品画像、商品名、価格、評価行に加え、フッターに「カートに追加」ボタンを配置し、その下に商品ページへのカード全体リンクを敷きます。入れ子にせずに両方のターゲットが機能します。

ブログ・リソース一覧

16:9のカバー画像、カテゴリーバッジ、2行に折り返す見出し、抜粋、そして見出しの長さに関係なく行全体で揃う著者名と読了時間のフッター。

SaaSダッシュボード

メディアを一切持たないメトリクスカード:ラベル、大きな数値、変化インジケーター、スパークライン。クエリが解決するまでは初回ペイント時にスケルトンとして表示されます。

料金・プラン比較

高さの揃った3枚のカード。1枚は太いボーダーとバッジで強調され、それぞれ下端に固定されたCTAボタンで終わるため、ボタンが一直線に並びます。

サイト種別ごとの カード パターン

同じ カード コンポーネントを、掲載するサイトの種類に合わせて調整します。

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.

カード のスタイルとバリアント

ページ全体のトーンに合うバリアントを選び、そのまま生成します。

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.

React・Next.js・Vue・Svelte での カード

React、Next.js、Vue 3、SvelteKit、Astro、素の HTML — 同じ カード を 6 通りの方法で組み込めます。

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>

カード をプロジェクトに追加する方法

カード テンプレートを選んで本番に載せるまでの 4 ステップ。

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.

カードに関するよくある質問

AIでカードコンポーネントを生成するには?

カードに何が入り、どう使われるかを説明してください。たとえば「正方形の画像、タイトル、価格、カート追加フッターを持つ商品カードを3カラムグリッドで」のように。MeDoはスロット構造、メディアの制約、ホバー状態をまとめて生成します。グリッドに言及することが重要です。それが高さを揃えるルールと aspect-ratio のルールを決めるからです。

カードコンポーネントはどんな部分から成りますか?

4つの領域でほぼすべてのケースをカバーできます:任意のメディア領域、タイトルと補助ラベルを含むヘッダー、説明的な内容のためのボディ、アクションやメタデータのためのフッターです。必須マークアップではなく任意のスロットとして扱えば、1つのコンポーネントで商品カード、記事カード、メトリクスカードをそれぞれ専用バリアントなしに賄えます。

カード全体をクリック可能にできますか?

はい。ただしボタンや他のリンクを含む場合はカードをアンカーで包まないでください。インタラクティブ要素の入れ子は無効なHTMLであり、ブラウザの挙動も予測できません。アンカーはタイトルに置き、絶対配置の疑似要素でカード全体に広げ、入れ子のコントロールはより高い z-index でその上に持ち上げてください。

グリッド内でカードの高さを揃えるには?

CSSグリッドを使えば同じ行のアイテムはすでに引き伸ばされて揃います。さらにカード自体をフレックスの縦並びにして、伸びるボディがフッターを下に押し出すようにします。高さの固定は誤った対処です。タイトルが1行増えた途端に内容が切り取られてしまいます。

カードにはシャドウとボーダーのどちらを使うべき?

ダッシュボードやテーブルのような密度の高いUIではボーダーの方が読みやすく、シャドウが多いと視覚的なノイズになります。シャドウは余白の多いマーケティングレイアウトで、カードを背景から浮かせたいときに向きます。どちらかを既定とし、もう一方は強調バリアント用に取っておきましょう。同じ階層で混在させるのは避けます。

カードにローディングスケルトンは必要ですか?

ネットワークリクエストで内容が入るカードならどれも恩恵があります。実際のコンテンツに合わせた寸法のスケルトンは、データ到着時のページの再配置を防ぎます。カードと同じプロンプトでスケルトンも依頼すれば、構造上、両者は寸法を共有します。別々に書くとこれを保つのは困難です。