ToolypetMCP
beginner3 minutescss

Card Component Style

Build a modern card component with shadow, border radius, hover transform, and smooth transitions.

cardshadowborder-radiustransform

このレシピの使いどころ

Cards are one of the most common UI patterns. This recipe creates a card that feels interactive and polished, suitable for product listings, blog posts, or dashboard widgets.

ステップ

1

Box Shadow Generator

このツールを試す

Add Material Design-inspired shadow

プロンプト:Generate a card shadow: 0 1px 3px rgba(0,0,0,0.12) and 0 1px 2px rgba(0,0,0,0.24)
2

Border Radius Generator

このツールを試す

Round the card corners

プロンプト:Generate 12px border radius for all corners
3

Transform Generator

このツールを試す

Create lift-on-hover effect

プロンプト:Generate translateY(-4px) transform for hover state
4

Smooth the hover transition

プロンプト:Generate a smooth ease-out cubic-bezier for 200ms transition

よくある質問

Should I use box-shadow or drop-shadow for cards?

box-shadow is preferred for cards as it supports spread radius and multiple shadows. drop-shadow is better for irregular shapes.

How do I add a border on hover instead?

Replace the transform step with a border-color transition. Use border: 2px solid transparent transitioning to a visible color.

関連レシピ