Skip to content

NewCard Component

The NewCard component is a versatile, modern card element perfect for showcasing features, services, or content blocks. It includes beautiful styling, icon support, and interactive hover effects.

PropTypeRequiredDefaultDescription
iconstringNo-Starlight icon name to display
titlestringYes-The card title (supports HTML)
iconColorstringNo-Custom color for the icon
sizestringNo”large”Card size variant (“large” or “sm”)
  • Icon Integration - Uses Starlight’s icon system
  • Two Size Variants - Large (default) and small options
  • Hover Animation - Arrow icon with rotation effect
  • Gradient Styling - Modern gradient borders and backgrounds
  • HTML Support - Title prop supports HTML content
  • Responsive Design - Adapts to different screen sizes
  • Slot Content - Accepts custom content in the card body
import NewCard from "../../../../components/user-components/NewCard.astro";
<NewCard
title="Getting Started"
icon="rocket"
>
Quick setup guide to get your documentation site running in minutes.
</NewCard>
import NewCard from "../../../../components/user-components/NewCard.astro";
<NewCard
title="Configuration"
icon="setting"
size="sm"
>
Customize your site settings and appearance.
</NewCard>
import NewCard from "../../../../components/user-components/NewCard.astro";
<NewCard
title="API Reference"
icon="document"
iconColor="#3b82f6"
>
Complete API documentation and examples.
</NewCard>
import NewCard from "../../../../components/user-components/NewCard.astro";
import Grid from "../../../../components/user-components/Grid.astro";
<Grid columns={3}>
<NewCard title="Install" icon="add-document">
Get up and running quickly
</NewCard>
<NewCard title="Configure" icon="setting">
Customize your setup
</NewCard>
<NewCard title="Deploy" icon="rocket">
Publish your site
</NewCard>
</Grid>
  • Full padding (py-12 px-10)
  • 2rem icon size
  • Includes hover arrow animation
  • Best for feature showcases
  • Compact padding (p-6)
  • 1.4rem icon size
  • No arrow animation
  • Perfect for compact layouts

The component supports all Starlight icons:

  • rocket - For getting started guides
  • setting - For configuration topics
  • document - For documentation pages
  • add-document - For creation workflows
  • And many more from the Starlight icon library
  • Gradient Borders - Modern visual appeal
  • Hover Effects - Interactive arrow rotation
  • Theme Integration - Works with light/dark themes
  • Group Hover - Enhanced interactivity
  • Responsive Spacing - Adapts to screen size
  • Use consistent icon styles across related cards
  • Choose appropriate size variants based on content length
  • Group related NewCards together for better organization
  • Use descriptive titles that clearly indicate the content purpose
  • Consider icon color coordination with your theme
  • Test hover effects to ensure they enhance user experience