Buttons
Primary Button
Gradient button with hover effect
HTML + CSS
<button class="btn btn-primary">Click Me</button>
<style>
.btn {
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
border: none;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
</style>
Outline Button
Border button with hover fill
HTML + CSS
<button class="btn btn-outline">Click Me</button>
<style>
.btn-outline {
background: transparent;
border: 2px solid #667eea;
color: #667eea;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.btn-outline:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}
</style>
Icon Button
Button with icon and text
HTML + CSS
<button class="btn btn-primary">
<i class="fas fa-download"></i> Download
</button>
<style>
.btn {
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
border: none;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
</style>
Cards
Basic Card
Simple card with shadow
Card Title
This is a simple card component with title and description.
HTML + CSS
<div class="card">
<div class="card-body">
<h3 class="card-title">Card Title</h3>
<p class="card-text">Card description text.</p>
</div>
</div>
<style>
.card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
overflow: hidden;
}
.card-body {
padding: 1.5rem;
}
.card-title {
font-size: 1.3rem;
font-weight: 600;
margin-bottom: 0.5rem;
}
.card-text {
color: #4a5568;
line-height: 1.6;
}
</style>
Card with Header
Card with colored header section
Featured
Card with gradient header background.
HTML + CSS
<div class="card">
<div class="card-header">
<h3>Featured</h3>
</div>
<div class="card-body">
<p>Card content here.</p>
</div>
</div>
<style>
.card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
overflow: hidden;
}
.card-header {
padding: 1.5rem;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.card-body {
padding: 1.5rem;
}
</style>
Form Elements
Text Input
Styled input with label
HTML + CSS
<div class="form-group">
<label class="form-label">Email Address</label>
<input type="email" class="form-input" placeholder="you@example.com">
</div>
<style>
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
display: block;
margin-bottom: 0.5rem;
color: #2d3748;
font-weight: 500;
}
.form-input {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 1rem;
}
.form-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
</style>
Textarea
Multi-line text input
HTML + CSS
<div class="form-group">
<label class="form-label">Message</label>
<textarea class="form-input" rows="3"></textarea>
</div>
<style>
.form-input {
width: 100%;
padding: 0.75rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 1rem;
font-family: inherit;
resize: vertical;
}
.form-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
</style>
Badges & Alerts
Status Badges
Colorful status indicators
Primary
Success
Warning
HTML + CSS
<span class="badge badge-primary">Primary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-warning">Warning</span>
<style>
.badge {
display: inline-block;
padding: 0.4rem 0.9rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
}
.badge-primary {
background: #667eea;
color: white;
}
.badge-success {
background: #10b981;
color: white;
}
.badge-warning {
background: #f59e0b;
color: white;
}
</style>
Success Alert
Success notification message
Success! Your changes have been saved.
HTML + CSS
<div class="alert alert-success">
<strong>Success!</strong> Changes saved.
</div>
<style>
.alert {
padding: 1rem 1.5rem;
border-radius: 8px;
margin: 1rem 0;
}
.alert-success {
background: #d1fae5;
color: #065f46;
border-left: 4px solid #10b981;
}
.alert-warning {
background: #fef3c7;
color: #92400e;
border-left: 4px solid #f59e0b;
}
.alert-error {
background: #fee2e2;
color: #991b1b;
border-left: 4px solid #ef4444;
}
</style>