astro-cards
v0.0.1A collection of beautifully designed, standalone UI kit card components for Astro
xnex install astro-cards GitHub repo Astro Cards UI Kit Recipe
Standalone, zero-dependency card components for Astro projects. Each card is copy-paste friendly, scoped with local styles, and designed to give developers strong visual variety without adding CSS framework baggage.
Why Use This Recipe?
Cards usually start simple, then slowly turn into one-off layout traps: a feature card needs a media slot, a dashboard tile needs a badge, a pricing teaser needs a footer action, and suddenly you are duplicating markup and CSS across pages.
This recipe keeps that under control:
- Eight independent designs: Pick only the card styles your project actually needs.
- Shared slot structure: Every card supports the same content regions, so swapping aesthetics does not force a markup rewrite.
- Zero-CSS overrides: Adjust background, text, border, glow, accent, or shadow tones directly through props.
- Scoped styles only: No global CSS leakage and no visual collisions with the rest of your app.
- Polymorphic links: Pass
hrefand the card renders as an accessible<a>instead of a plain<div>. - Real UX states: Interactive, selectable, loading, glass, glow, gradient, neon, and retro behaviors are ready out of the box.
What's Inside?
| Variant | Component File | Visual Vibe |
|---|---|---|
| Basic | basic.card.astro | Versatile product, dashboard, and content card foundation with multiple layout moods. |
| Glass | glass.card.astro | Frosted translucent overlay card for command centers, dashboards, and futuristic panels. |
| Neon | neon.card.astro | Cyberpunk terminal-inspired card with glow, pulse, and tech-corner details. |
| Gradient | gradient.card.astro | Vivid animated gradient card for launch panels, promos, and feature highlights. |
| Retro | retro.card.astro | Neo-brutalist poster card with strong contrast and tactile offset shadows. |
| Glow | glow.card.astro | Premium CTA card with border beam animation and ambient aura lighting. |
| Minimal | minimal.card.astro | Dense editorial card for changelogs, lists, summaries, and clean product UI. |
| Interactive | interactive.card.astro | Stateful selectable card with loading skeletons for app-like workflows. |
Quick Start
1. Basic Usage
---
import BasicCard from '../components/cards/basic.card.astro';
import GlassCard from '../components/cards/glass.card.astro';
---
<BasicCard variant="elevated" isHoverable={true}>
<span slot="badge">Live</span>
<span slot="title">Telemetry Summary</span>
<span slot="subtitle">Realtime service status</span>
<p>Monitor your production systems with a clean baseline card.</p>
<div slot="footer">
<span>99.98% uptime</span>
<span>12 regions</span>
</div>
</BasicCard>
<GlassCard variant="violet" blur="lg" href="/control-center">
<span slot="badge">Overlay</span>
<span slot="title">Control Center</span>
<span slot="subtitle">Command-ready glass panel</span>
<p>Use frosted layers when you want depth without heavy chrome.</p>
</GlassCard>
2. Shared Slots
All card variants support the same reusable content regions:
media: top visual area such as charts, mock previews, gradients, posters, or thumbnailstitle: main headingsubtitle: secondary supporting textbadge: compact status pill or metadataheader: custom elements injected alongside title and subtitle- default slot: main card body content
footer: stats, links, actions, or secondary meta
3. Zero-CSS Customization
---
import GlowCard from '../components/cards/glow.card.astro';
import RetroCard from '../components/cards/retro.card.astro';
---
<GlowCard
bg="#08111f"
textColor="#f8fafc"
borderColor="rgba(56, 189, 248, 0.35)"
glowColor="linear-gradient(90deg, #22d3ee, #8b5cf6)"
>
<span slot="title">Custom Aura</span>
<p>Override visual tokens without touching a stylesheet.</p>
</GlowCard>
<RetroCard
bg="#fef08a"
textColor="#111111"
shadowColor="#111111"
radius="sm"
>
<span slot="title">Poster Drop</span>
<p>Quickly adapt the same component to a bold campaign aesthetic.</p>
</RetroCard>
4. Interactive States
---
import InteractiveCard from '../components/cards/interactive.card.astro';
---
<InteractiveCard variant="selectable" isSelected={true}>
<span slot="badge">Selected</span>
<span slot="title">Workspace Alpha</span>
<span slot="subtitle">Shared delivery board</span>
<p>Perfect for account pickers, template choosers, or dashboard modules.</p>
</InteractiveCard>
<InteractiveCard isLoading={true} />
Common Developer API
These props stay consistent across the full card set:
| Prop | Type | Default | Description |
|---|---|---|---|
padding | 'none' | 'sm' | 'md' | 'lg' | 'xl' | Variant-specific | Controls internal spacing density. |
radius | Variant-specific | Variant-specific | Card corner radius. |
bg | string | undefined | Custom background or gradient override. |
textColor | string | undefined | Custom text color override. |
borderColor | string | undefined | Custom border color override. |
href | string | undefined | Renders the card as an anchor when provided. |
target | string | undefined | Anchor target attribute. |
rel | string | undefined | Anchor rel attribute. |
class | string | undefined | Extra class names for custom composition. |
Variant-Specific Extras
| Component | Extra Props |
|---|---|
basic.card.astro | variant, isHoverable |
glass.card.astro | variant, blur, interactive |
neon.card.astro | variant, glowing, pulsing, techCorners |
gradient.card.astro | variant, gradientType, animated |
retro.card.astro | variant, shadowOffset, shadowColor, isHoverable |
glow.card.astro | variant, glowColor, beamSpeed |
minimal.card.astro | variant, accentColor, isHoverable |
interactive.card.astro | variant, isSelected, isLoading |
Developer Experience Notes
When you install this recipe, your selected files land directly in src/components/cards/. There is no runtime package wrapper, no hidden styling engine, and no lock-in. You can start with one variant, mix multiple styles in the same project, or fully fork the components because the code is already yours.
For quick validation, this recipe also ships with src/pages/astro-card-test.astro, a showcase page that automatically detects which card files exist in your project and renders only those components.
Versions
Release links are tracked by Nex; source code lives in the developer's GitHub repo.
setup.files
Files that will be integrated into your project
- recipes
- astro-cards
- README.md → recipes/astro-cards
-
-
- src
- pages
- astro-card-test.astro → src/pages
-
-
nexconfig
Full recipe configuration
{
"name": "astro-cards",
"version": "0.0.1",
"description": "A collection of beautifully designed, standalone UI kit card components for Astro",
"keywords": [
"astro",
"cards",
"ui-kit",
"components",
"recipe"
],
"files": [
"src/components",
"src/pages/astro-card-test.astro",
"recipes/astro-cards/README.md"
],
"setup": {
"files": {
"src/pages/astro-card-test.astro": "src/pages",
"recipes/astro-cards/README.md": "recipes/astro-cards"
},
"variants": [
{
"name": "basic card",
"description": "Flexible content card with clean presets, shared slots, and zero-CSS theme overrides",
"setup": {
"files": {
"src/components/cards/basic.card.astro": "src/components/cards"
}
}
},
{
"name": "glass card",
"description": "Glassmorphic frosted dashboard card with blur depth and animated light sheen",
"setup": {
"files": {
"src/components/cards/glass.card.astro": "src/components/cards"
}
}
},
{
"name": "neon card",
"description": "Cyberpunk glowing card with tech corners, pulse states, and bold sci-fi presence",
"setup": {
"files": {
"src/components/cards/neon.card.astro": "src/components/cards"
}
}
},
{
"name": "gradient card",
"description": "Animated gradient surface or border card for feature callouts and launch panels",
"setup": {
"files": {
"src/components/cards/gradient.card.astro": "src/components/cards"
}
}
},
{
"name": "retro card",
"description": "Neo-brutalist poster card with tactile shadow offsets and playful bold contrast",
"setup": {
"files": {
"src/components/cards/retro.card.astro": "src/components/cards"
}
}
},
{
"name": "glow card",
"description": "Premium spotlight card with rotating border beam and ambient aura effects",
"setup": {
"files": {
"src/components/cards/glow.card.astro": "src/components/cards"
}
}
},
{
"name": "minimal card",
"description": "Dense editorial card with understated chrome, accent rails, and crisp information hierarchy",
"setup": {
"files": {
"src/components/cards/minimal.card.astro": "src/components/cards"
}
}
},
{
"name": "interactive card",
"description": "Stateful selectable card with loading skeletons and interactive workspace behaviors",
"setup": {
"files": {
"src/components/cards/interactive.card.astro": "src/components/cards"
}
}
}
]
}
}
basic card
Flexible content card with clean presets, shared slots, and zero-CSS theme overrides
Files
- src
- components
- cards
- basic.card.astro → src/components/cards
-
-
-
`basic card` raw config
Full `basic card` variant configuration
{
"name": "basic card",
"description": "Flexible content card with clean presets, shared slots, and zero-CSS theme overrides",
"setup": {
"files": {
"src/components/cards/basic.card.astro": "src/components/cards"
}
}
}
glass card
Glassmorphic frosted dashboard card with blur depth and animated light sheen
Files
- src
- components
- cards
- glass.card.astro → src/components/cards
-
-
-
`glass card` raw config
Full `glass card` variant configuration
{
"name": "glass card",
"description": "Glassmorphic frosted dashboard card with blur depth and animated light sheen",
"setup": {
"files": {
"src/components/cards/glass.card.astro": "src/components/cards"
}
}
}
neon card
Cyberpunk glowing card with tech corners, pulse states, and bold sci-fi presence
Files
- src
- components
- cards
- neon.card.astro → src/components/cards
-
-
-
`neon card` raw config
Full `neon card` variant configuration
{
"name": "neon card",
"description": "Cyberpunk glowing card with tech corners, pulse states, and bold sci-fi presence",
"setup": {
"files": {
"src/components/cards/neon.card.astro": "src/components/cards"
}
}
}
gradient card
Animated gradient surface or border card for feature callouts and launch panels
Files
- src
- components
- cards
- gradient.card.astro → src/components/cards
-
-
-
`gradient card` raw config
Full `gradient card` variant configuration
{
"name": "gradient card",
"description": "Animated gradient surface or border card for feature callouts and launch panels",
"setup": {
"files": {
"src/components/cards/gradient.card.astro": "src/components/cards"
}
}
}
retro card
Neo-brutalist poster card with tactile shadow offsets and playful bold contrast
Files
- src
- components
- cards
- retro.card.astro → src/components/cards
-
-
-
`retro card` raw config
Full `retro card` variant configuration
{
"name": "retro card",
"description": "Neo-brutalist poster card with tactile shadow offsets and playful bold contrast",
"setup": {
"files": {
"src/components/cards/retro.card.astro": "src/components/cards"
}
}
}
glow card
Premium spotlight card with rotating border beam and ambient aura effects
Files
- src
- components
- cards
- glow.card.astro → src/components/cards
-
-
-
`glow card` raw config
Full `glow card` variant configuration
{
"name": "glow card",
"description": "Premium spotlight card with rotating border beam and ambient aura effects",
"setup": {
"files": {
"src/components/cards/glow.card.astro": "src/components/cards"
}
}
}
minimal card
Dense editorial card with understated chrome, accent rails, and crisp information hierarchy
Files
- src
- components
- cards
- minimal.card.astro → src/components/cards
-
-
-
`minimal card` raw config
Full `minimal card` variant configuration
{
"name": "minimal card",
"description": "Dense editorial card with understated chrome, accent rails, and crisp information hierarchy",
"setup": {
"files": {
"src/components/cards/minimal.card.astro": "src/components/cards"
}
}
}
interactive card
Stateful selectable card with loading skeletons and interactive workspace behaviors
Files
- src
- components
- cards
- interactive.card.astro → src/components/cards
-
-
-
`interactive card` raw config
Full `interactive card` variant configuration
{
"name": "interactive card",
"description": "Stateful selectable card with loading skeletons and interactive workspace behaviors",
"setup": {
"files": {
"src/components/cards/interactive.card.astro": "src/components/cards"
}
}
}
You might also be interested in these
astro-buttons
A collection of beautifully designed, standalone UI kit button components for Astro
nestjs-basic-auth
NESTJS BASIC AUTH RECIPE
nestjs
NESTJS EMPTY TEMPLATE
nestjs-logging
NESTJS REQUEST LOGGING MIDDLEWARE RECIPE
fastapi-exceptions
Global exception handling module and demo error endpoints for FastAPI recipes.