BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/adn-ui/card

Card

adn-ui/card
FreeComponent

A container component displaying content, header, title, and footer.

Live preview

live · rendered by the registry
Rendered by adn-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.awaiden.com/r/card.json

Source

src/components/ui/card/card.tsxui.awaiden.com/r/card.json
1"use client";
2
3import "./card.css";
4import type React from "react";
5import { cn } from "tailwind-variants";
6
7import { CardContext, useCardContext } from "./card.context";
8import { cardVariants, type CardVariants } from "./card.variants";
9
10export type CardProps = CardVariants & React.ComponentProps<"div">;
11
12export const CardRoot = ({ children, className, variant, ...props }: CardProps) => {
13 const slots = cardVariants({ variant });
14
15 return (
16 <CardContext.Provider value={{ slots }}>
17 <div className={cn(slots.root(), className)} {...props}>
18 {children}
19 </div>
20 </CardContext.Provider>
21 );
22};
23
24export type CardHeaderProps = React.ComponentProps<"div">;
25
26export const CardHeader = ({ className, ...props }: CardHeaderProps) => {
27 const { slots } = useCardContext();
28 return <div className={cn(slots.header(), className)} {...props} />;
29};
30
31export type CardTitleProps = React.ComponentProps<"h3">;
32
33export const CardTitle = ({ className, ...props }: CardTitleProps) => {
34 const { slots } = useCardContext();
35 return <h3 className={cn(slots.title(), className)} {...props} />;
36};
37
38export type CardDescriptionProps = React.ComponentProps<"p">;
39
40export const CardDescription = ({ className, ...props }: CardDescriptionProps) => {
41 const { slots } = useCardContext();
42 return <p className={cn(slots.description(), className)} {...props} />;
43};
44
45export type CardContentProps = React.ComponentProps<"div">;
46
47export const CardContent = ({ className, ...props }: CardContentProps) => {
48 const { slots } = useCardContext();
49 return <div className={cn(slots.content(), className)} {...props} />;
50};
51
52export type CardFooterProps = React.ComponentProps<"div">;
53
54export const CardFooter = ({ className, ...props }: CardFooterProps) => {
55 const { slots } = useCardContext();
56 return <div className={cn(slots.footer(), className)} {...props} />;
57};

What it pulls in

npm packages

  • tailwind-variants

Files it writes

  • src/components/ui/card/card.tsx
  • src/components/ui/card/card.variants.ts
  • src/components/ui/card/card.context.ts
  • src/components/ui/card/card.css
  • src/components/ui/card/index.ts

Facts

Registry
adn-ui
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on adn-ui ui.awaiden.com awaiden/adn-ui on GitHub Raw registry item This item as JSON

More from adn-ui

All 46 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionadn-uiComponentsFree2 deps · 5 files
Alert Dialogalert-dialogadn-uiComponentsFree2 deps · 5 files
Aspect Ratioaspect-ratioadn-uiComponentsFree1 dep · 5 files
Autocompleteautocompleteadn-uiComponentsFree2 deps · 5 files
Avataravataradn-uiComponentsFree2 deps · 5 files
Badgebadgeadn-uiComponentsFree1 dep · 5 files
Breadcrumbbreadcrumbadn-uiComponentsFree1 dep · 5 files
Buttonbuttonadn-uiComponentsFree1 dep · 4 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex