FeaturedCard
SM · 950B gzip budgetHighlighted card with image, title, and description.
- Category
- Media & layout
- Budget
- sm, single-purpose control
- External runtime
- React / React DOM only
axe fixtureSSR rendersource scanbundle budget
Preview
Live fixtureFeatured
Content
Try the component here. Locale-aware formatting and direction follow the selected language; example content and labels are not automatically translated. Overlay demos use interactive launchers.
Install
npx shadcn@latest add https://gear5-ui.vercel.app/r/featured-card.jsonCopies the source into your project.
New here? Set up Tailwind and import aliases first →Source & props
Edit on GitHub ↗Prop types and inline documentation are included below. This is repository source; the installer rewrites shared imports for your project.
"use client";
import React from "react";
export interface FeaturedCardProps {
children: React.ReactNode;
title?: string;
accentColor?: string;
className?: string;
ariaLabel?: string;
}
export function FeaturedCard({
children,
title,
accentColor = "var(--color-primary, #3b82f6)",
className = "",
ariaLabel,
}: FeaturedCardProps) {
return (
<article
aria-label={ariaLabel}
className={className}
style={{
border: "1px solid var(--color-border, #e5e7eb)",
borderInlineStart: `4px solid ${accentColor}`,
borderRadius: "0.5rem",
padding: "1.5rem",
background: "var(--color-bg, #fff)",
transition: "box-shadow 0.2s ease",
}}
>
{title && (
<h3
style={{
fontSize: "1.125rem",
fontWeight: 600,
marginBlockEnd: "0.75rem",
color: "var(--color-text, #111827)",
}}
>
{title}
</h3>
)}
{children}
</article>
);
}
What CI checks
Quality contract- Bundled, minified and gzipped against its tier budget
- Audited by axe in the state previewed above
- Rendered through react-dom/server with no browser globals
- Scanned for network calls, dangerous sinks, and unguarded animation