Card component

Card Generator

Dimensions
300px
200px
24px
Styling
12px
10

Card Title

This is a sample card description. You can adjust the styles using the controls.

html
<div class="card">
  <div class="card-image"></div>
  <div class="card-content">
    <h3>Card Title</h3>
    <p>This is a sample card description. You can adjust the styles using the controls.</p>
    <button>Read More</button>
  </div>
</div>
css
.card {
  width: 300px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  font-family: sans-serif;
}

.card-image {
  height: 200px;
  background-color: #3b82f6;
  background-image: url('https://picsum.photos/seed/card/600/400');
  background-size: cover;
  background-position: center;
}

.card-content {
  padding: 24px;
}

.card-content h3 {
  margin: 0 0 10px;
  color: #1e293b;
}

.card-content p {
  margin: 0 0 20px;
  color: #64748b;
  line-height: 1.5;
}

.card-content button {
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.card-content button:hover {
  background: #2563eb;
}

GET MORE FROM THIS RESOURCE

Build a card around one useful summary

A card should help a visitor decide whether to open the underlying content. Lead with a descriptive title, use a short summary, and keep metadata secondary. Avoid making every piece of a card a separate link when all of them go to the same destination.

Use the generator to establish the appearance, then adapt the exported markup and styles to your application. A preview demonstrates the visual treatment; it does not certify your final interaction. Check the implementation with real content, a narrow screen, and keyboard input before publishing.

Try the component in the code editor →