Skip to main content

Card Generator

Design cards with CSS & JSX

Card Settings

Border

Shadow

Image

Title

Description

Button

Live Preview

Card image

Card Title

Card description goes here. This is a sample text to show how your card will look.

Action

Code

<!-- HTML -->
<div class="card">
  <img src="/api/placeholder-image?width=320&height=200&fs=26" alt="Card image" class="card-image" />
  <div class="card-content">
    <h3 class="card-title">Card Title</h3>
    <p class="card-description">Card description goes here. This is a sample text to show how your card will look.</p>
    <a href="#" class="card-button">Action</a>
  </div>
</div>

<style>
.card {
  width: 320px;
  padding: 24px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.card-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 12px 0;
  text-align: left;
}

.card-description {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 16px 0;
  text-align: left;
  line-height: 1.5;
}

.card-button {
  padding: 8px 16px;
  font-size: 16px;
  background-color: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
}

.card-button:hover {
  opacity: 0.9;
}
</style>