ToolypetMCP
beginner3 minutescss

Card Component Style

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

cardshadowborder-radiustransform

Quando usar esta receita

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.

Etapas

1

Add Material Design-inspired shadow

Prompt: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

Experimente esta ferramenta

Round the card corners

Prompt:Generate 12px border radius for all corners
3

Create lift-on-hover effect

Prompt:Generate translateY(-4px) transform for hover state
4

Smooth the hover transition

Prompt:Generate a smooth ease-out cubic-bezier for 200ms transition

Perguntas frequentes

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.

Receitas relacionadas