Design it card based design
Skill ranbot-ai/awesome-skills/skills/design-it-card-based-design
Web and App implementation guide for Card-Based Design. Trigger when user wants information cards, Pinterest-style layouts, and bite-sized content containers.From its SKILL.md
npx -y skills add ranbot-ai/awesome-skills --skill design-it-card-based-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Card-Based Design
"Bite-sized consumption. Encapsulating discrete pieces of information into distinct visual containers."
When to Use
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.
Core Principles
- Encapsulation: Every card is self-contained. It has an image, a title, a short description, and usually an action (like a button or a 'like' icon).
- Responsive Flow: Cards easily reflow on different screen sizes (from a 4-column grid on desktop to a single column on mobile).
- Clear Boundaries: Cards must visually pop off the background.
Visual DNA
- Colors: Very flexible. The background should be slightly darker or distinct from the card color. Sophisticated Neutral works well for a premium feel.
- Typography: Clear hierarchy within the card (Header, Subheader, Body).
- Styling: Standard
border-radius: 8pxand a medium drop shadow.
Web Implementation
- CSS Grid with
auto-fitor a Masonry layout. - CSS Example:
body {
background-color: #f0f2f5; /* Standard app background */
padding: 40px;
}
.card-grid {
display: grid;
/* Auto-responsive magic */
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 24px;
}
.card {
background: #ffffff;
border-radius: 12px;
overflow: hidden; /* Keep images inside the rounded corners */
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.card-image {
width: 100%;
height: 200px;
object-fit: cover;
border-bottom: 1px solid #eee;
}
.card-content {
padding: 20px;
flex-grow: 1; /* Pushes footer to the bottom */
}
.card-footer {
padding: 16px 20px;
border-top: 1px solid #eee;
display: flex;
justify-content: space-between;
}
App Implementation
SwiftUI
struct ContentCard: View {
var body: some View {
VStack(alignment: .leading, spacing: 0) {
// Image Area
Rectangle()
.fill(Color.gray.opacity(0.2))
.frame(height: 160)
// Content Area
VStack(alignment: .leading, spacing: 8) {
Text("Card Title")
.font(.headline)
Text("A brief description of the content inside this discrete card container.")
.font(.subheadline)
.foregroundColor(.secondary)
.lineLimit(2)
}
.padding(16)
}
.background(Color.white)
.cornerRadius(12)
// Clean, subtle drop shadow
.shadow(color: Color.black.opacity(0.08), radius: 12, x: 0, y: 4)
}
}
// In your view:
// LazyVGrid(columns: [GridItem(.adaptive(minimum: 160), spacing: 16)]) { ... }
VStackinside a background with.cornerRadiusand.shadowis the standard.- Use
LazyVGridwith.adaptive(minimum: 160)to automatically create a multi-column card grid that flows perfectly on iPad or iPhone.
Flutter
class ContentCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
elevation: 4, // Handles shadow natively
shadowColor: Colors.black.withOpacity(0.4),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
clipBehavior: Clip.antiAlias, // Critical: stops images from bleeding over corners
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
// Image Area
Container(
height: 160,
color: Colors.grey[300],
width: double.infinity,
),
// Content Area
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text('Card Title', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18)),
SizedBox(height: 8),
Text(
'A brief description of the content inside this discrete card container.',
style: TextStyle(color: Colors.black54),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
],
),
),
],
),
);
}
}
// In your view: Use GridView.builder for the layout
- The native
Cardwidget does almost all the heavy lifting. - Critical fix: You must set
clipBehavior: Clip.antiAliason theCard, otherwise the top corners of your images will peek outside the border radius.
React Native
const ContentCard = () => {
return (
<View style={styles.card}>
<View style={s
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.