Skip to main content

Card

Title

Subtitle

Some description

import React from 'react';
import { Card } from 'chic-ui';

<Card
type="secondary"
title="Title"
subTitle="Subtitle"
description="Some description"
footer="Footer"
href="https://github.com/karishmashuklaa/chic-ui"
hrefText="Visit site"
/>;

Add Image to Card

Use the src prop to add an image to a card in the following manner

Title

Subtitle

Something about a cat

import React from 'react';
import { Card } from 'chic-ui';

<Card
type="light"
src="kitten.jpg"
title="Title"
subTitle="Subtitle"
description="Something about a cat"
footer="Footer"
href="https://github.com/karishmashuklaa/chic-ui"
hrefText="Visit site"
/>;

CardGroups

Mutiple cards can be wrapped together in the <CardGroup /> component

Card 1

Lorem ipsum dolor sit amet

Written on 29/12/2021

Card 2

Lorem ipsum dolor sit amet

Written on 29/12/2021

Card 3

Lorem ipsum dolor sit amet

Written on 29/12/2021

import React from 'react';
import { CardGroup, Card } from 'chic-ui';

<CardGroup>
<Card
type="success"
src="kitten.jpg"
title="Card 1"
description="Lorem ipsum dolor sit amet"
footer="Written on 29/12/2021"
/>
<Card
type="info"
src="kitten.jpg"
title="Card 2"
description="Lorem ipsum dolor sit amet"
footer="Written on 29/12/2021"
/>
<Card
type="danger"
src="kitten.jpg"
title="Card 3"
description="Lorem ipsum dolor sit amet"
footer="Written on 29/12/2021"
/>
</CardGroup>;

API

import { Card } from 'chic-ui';
NameTypeDefaultDescription
type'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'light''light'Color of the card
srcstringAdd image to the card
titlestringAdd title to the card
subTitlestringAdd sub-title to the card
childrenReactNodePass children
descriptionstringAdd description to the card
footerReactNodeAdd footer to the card
hrefstringAdd links to the card
hrefTextstringAdd texts to links
classNamestringProvide external classnames to the component
styleReact.CSSPropertiesOverride default styling of the component
import { CardGroup } from 'chic-ui';
NameTypeDefaultDescription
childrenReactNodePass children
classNamestringProvide external classnames to the component
styleReact.CSSPropertiesOverride default styling of the component