Build a card with elevation presets, radius, border, and an optional gradient header — copy the CSS
Surface
Elevation
Border
Live preview
CSS
.custom-card {
width: 320px;
max-width: 100%;
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 16px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.custom-card__header {
height: 80px;
background: linear-gradient(135deg, #6366f1, #a855f7);
border-radius: 16px 16px 0 0;
}
.custom-card__body {
padding: 24px;
}