BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/karrix/info-card

info-card

karrix/info-card
FreeBlock

Information cards can serve as callout cards, banners, toast notifications, or announcement boxes to deliver news, updates, and alerts to your users.

Live preview

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

Install it

npx shadcn@latest add https://karrix.dev/r/info-card.json

Source

registry/kl-ui/info-card/info-card.tsxkarrix.dev/r/info-card.json · first 6 KB
1"use client";
2
3import {
4 useState,
5 useRef,
6 useEffect,
7 createContext,
8 useContext,
9 useMemo,
10 useCallback,
11} from "react";
12import { motion, AnimatePresence } from "motion/react";
13import { cn } from "@/lib/utils";
14import React from "react";
15
16interface InfoCardTitleProps extends React.HTMLAttributes<HTMLDivElement> {
17 children: React.ReactNode;
18}
19
20interface InfoCardDescriptionProps
21 extends React.HTMLAttributes<HTMLDivElement> {
22 children: React.ReactNode;
23}
24
25const InfoCardTitle = React.memo(
26 ({ children, className, ...props }: InfoCardTitleProps) => {
27 return (
28 <div className={cn("font-medium mb-1", className)} {...props}>
29 {children}
30 </div>
31 );
32 }
33);
34InfoCardTitle.displayName = "InfoCardTitle";
35
36const InfoCardDescription = React.memo(
37 ({ children, className, ...props }: InfoCardDescriptionProps) => {
38 return (
39 <div
40 className={cn("text-muted-foreground leading-4", className)}
41 {...props}
42 >
43 {children}
44 </div>
45 );
46 }
47);
48InfoCardDescription.displayName = "InfoCardDescription";
49
50interface CommonCardProps extends React.HTMLAttributes<HTMLDivElement> {
51 children: React.ReactNode;
52}
53
54interface InfoCardProps extends React.HTMLAttributes<HTMLDivElement> {
55 children: React.ReactNode;
56 storageKey?: string;
57 dismissType?: "once" | "forever";
58}
59
60type InfoCardContentProps = CommonCardProps;
61type InfoCardFooterProps = CommonCardProps;
62type InfoCardDismissProps = React.HTMLAttributes<HTMLDivElement> & {
63 children: React.ReactNode;
64 onDismiss?: () => void;
65};
66type InfoCardActionProps = CommonCardProps;
67
68const InfoCardContent = React.memo(
69 ({ children, className, ...props }: InfoCardContentProps) => {
70 return (
71 <div className={cn("flex flex-col gap-1 text-xs", className)} {...props}>
72 {children}
73 </div>
74 );
75 }
76);
77InfoCardContent.displayName = "InfoCardContent";
78
79interface MediaItem {
80 type?: "image" | "video";
81 src: string;
82 alt?: string;
83 className?: string;
84 [key: string]: any;
85}
86
87interface InfoCardMediaProps extends React.HTMLAttributes<HTMLDivElement> {
88 media: MediaItem[];
89 loading?: "eager" | "lazy";
90 shrinkHeight?: number;
91 expandHeight?: number;
92}
93
94const InfoCardImageContext = createContext<{
95 handleMediaLoad: (mediaSrc: string) => void;
96 setAllImagesLoaded: (loaded: boolean) => void;
97}>({
98 handleMediaLoad: () => {},
99 setAllImagesLoaded: () => {},
100});
101
102const InfoCardContext = createContext<{
103 isHovered: boolean;
104// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • registry/kl-ui/info-card/info-card.tsx

Facts

Registry
karrix
Type
registry:block
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
today

Go to the source

Docs on karrix karrix.dev KarrixLee/KL-ui on GitHub Raw registry item This item as JSON

More from karrix

All 4 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
unsave-popupunsave-popupkarrixBlocksFree1 dep
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