Card
A versatile Card component that displays content with various styles and layouts.
Import
import { VKCard } from "@vivakits/react-components";
Example
A basic card design using VKCard
components.
Basic card
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
Header
Defines the top section of the card that appears above the main content. Allows insertion of custom elements like icons, additional actions, or supplementary information to provide context or visual hierarchy. You can set top section using VKCardHeader
.
Card with header
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
Title
Renders the primary heading or title of the card. Supports both string and complex React node types, enabling rich text formatting, inline components, or custom title designs beyond simple text. You can set title inside VKCardHeader
using title
prop.
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
Content
Specifies the primary content area of the card. Provides maximum flexibility by accepting any renderable React content, from simple text to complex nested components or interactive elements. You can set contents inside VKCardContent
.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
Footer
Defines the bottom section of the card that appears after the main content. Typically used for action buttons, additional information, metadata, or supplementary controls related to the card's content. You can set using VKCardFooter
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
@copyright
Variant
Determines the visual style and presentation of the card. Enables designers to choose between different rendering modes that can adapt to various design system requirements and create visual hierarchy. You can set VKCard
component different variant using variant
prop set values solid
or outline
as per requirements.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
Width
Specifies the horizontal dimension of the card. Allows precise control over the card's width, supporting both fixed pixel values and responsive percentage-based measurements to fit different layout contexts. You can set different size using width
prop set value sm
| md
| lg
| xl
.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
BackgroundColor
Allows custom color specification for the card's background area. Provides design flexibility to match brand guidelines, create visual hierarchies, or implement specific design system color requirements. You can set background color using bgColor
prop set value primary
| secondary
| warning
| success
| danger
.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
ClassName
Enables attachment of custom CSS classes to the card component. Provides extensive styling flexibility, allowing developers to extend or override default styles and seamlessly integrate with existing design systems. You can set custom design using className
prop.
More Info
Provide a clear and concise explanation of the purpose of this card. Include key details about the topic or functionality it addresses. Mention any specific use case or scenario where this card is relevant.
API Reference
Attribute | Type | Description | Default |
---|---|---|---|
title | string | string[] | Set title at card header | |
icon | string | Set icon url | |
iconWidth | number | Set header icon width | |
iconHeight | number | Set header icon height | |
variant | solidoutline | Set card different varieant | solid |
width | smmdlgxl | Set card different width | default |
rounded | defaultnonexssmmdlgfulll | Changes the border radius of the card. | default |
VKCardHeader | ReactNode | Set as card header. Can set multiple React components. | |
VKCardContent | ReactNode | Set as card content container. Can set multiple React components. | |
VKCardFooter | ReactNode | Set as card footer. Can set multiple React components. | |
className | string | Set custom tailwind css classes using className. |