VaneUI

VaneUI

Layout Components

Card

A flexible container component that groups related content with consistent styling. Cards can contain text, images, and other components.

Basic Card

A simple card container with default styling.

Welcome to VaneUI

Build beautiful interfaces with ready-to-use components.

react-icon

BasicCard.tsx

<Card>
<Title>Welcome to VaneUI</Title>
<Text>Build beautiful interfaces with ready-to-use components.</Text>
</Card>

Card Sizes

Cards come in different sizes: xs, sm, md (default), lg, xl.

Small Card

Compact content

Medium Card

Default size

Large Card

More spacious

react-icon

CardSizes.tsx

<Row flexWrap gap>
<Card sm>
<Title sm>Small Card</Title>
<Text sm>Compact content</Text>
</Card>
<Card>
<Title>Medium Card</Title>
<Text>Default size</Text>
</Card>
<Card lg>
<Title lg>Large Card</Title>
<Text lg>More spacious</Text>
</Card>
</Row>

Card Appearances

Cards support color appearances: primary, brand, accent, secondary, tertiary, success, danger, warning, info, link.

Primary

Main action

Brand

Brand color

Accent

Highlight

Secondary

Subtle styling

Success

Positive status

Danger

Error or alert

react-icon

CardAppearances.tsx

<Row flexWrap gap>
<Card primary>
<Title>Primary</Title>
<Text>Main action</Text>
</Card>
<Card brand>
<Title>Brand</Title>
<Text>Brand color</Text>
</Card>
<Card accent>
<Title>Accent</Title>
<Text>Highlight</Text>
</Card>
<Card secondary>
<Title>Secondary</Title>
<Text>Subtle styling</Text>
</Card>
<Card success>
<Title>Success</Title>
<Text>Positive status</Text>
</Card>
<Card danger>
<Title>Danger</Title>
<Text>Error or alert</Text>
</Card>
</Row>

Card Variants

Use filled for solid backgrounds, outline for bordered cards, and add shadow for elevation.

Filled Card

Solid background

Outline Card

Border only

Shadow Card

Elevated appearance

react-icon

CardVariants.tsx

<Row flexWrap gap>
<Card filled primary>
<Title filled primary>Filled Card</Title>
<Text filled primary>Solid background</Text>
</Card>
<Card outline primary>
<Title primary>Outline Card</Title>
<Text primary>Border only</Text>
</Card>
<Card shadow>
<Title>Shadow Card</Title>
<Text>Elevated appearance</Text>
</Card>
</Row>

Card Shapes

Cards support different border radius styles: rounded (default), pill, and sharp.

Rounded

Default style

Pill

Fully rounded

Sharp

No radius

react-icon

CardShapes.tsx

<Row flexWrap gap>
<Card>
<Title>Rounded</Title>
<Text>Default style</Text>
</Card>
<Card pill>
<Title>Pill</Title>
<Text>Fully rounded</Text>
</Card>
<Card sharp>
<Title>Sharp</Title>
<Text>No radius</Text>
</Card>
</Row>

Responsive Layout

Use row for horizontal layout and mobileCol or tabletCol to switch to column on smaller screens.

Product Image

Visual content area

Product Details

This layout switches to column on tablets and below. Resize to see the effect.

react-icon

ResponsiveLayout.tsx

<Card gap row tabletCol>
<Col>
<Title>Product Image</Title>
<Text secondary>Visual content area</Text>
</Col>
<Col>
<Title>Product Details</Title>
<Text>This layout switches to column on tablets and below. Resize to see the effect.</Text>
</Col>
</Card>

Card as Link

Add href to make the card a clickable link. The card automatically renders as an <a> tag when href is provided, ensuring valid HTML.

react-icon

CardasLink.tsx

<Row flexWrap gap>
<Card filled href="#services" primary>
<Title filled primary>Services</Title>
<Text filled primary>Click to navigate</Text>
</Card>
<Card filled href="#pricing" secondary>
<Title filled secondary>Pricing</Title>
<Text filled secondary>View our plans</Text>
</Card>
<Card
href="https://github.com"
outline
rel="noopener noreferrer"
target="_blank"
>
<Title>External Link</Title>
<Text>Opens in new tab</Text>
</Card>
</Row>

Card Props

Font Weight

Font weight props for controlling text weight

thin

Thin font weight (100)

extralight

Extra light font weight (200)

light

Light font weight (300)

normal

Normal font weight (400)

medium

Medium font weight (500)

semibold

Semibold font weight (600)

bold

Bold font weight (700)

extrabold

Extra bold font weight (800)

black

Black font weight (900)

Font Style

Font style props for controlling text style

italic

Italic font style

notItalic

Not italic (normal) font style

Text Decoration

Text decoration props for controlling text underline/strikethrough

underline

Add underline decoration below text

lineThrough

Add strikethrough/line-through decoration across text

noUnderline

Remove text decoration (no underline, strikethrough, etc.)

overline

Add overline decoration above text

Text Transform

Text transform props for controlling text case

uppercase

Transform text to uppercase

lowercase

Transform text to lowercase

capitalize

Capitalize first letter of each word

normalCase

Normal text case (no transformation)

Font Family

Font family props for controlling text font

sans

Sans-serif font family (default)

serif

Serif font family

mono

Monospace font family

Text Align

Text alignment props for controlling text position

textLeft

Align text to left

textCenter

Align text to center

textRight

Align text to right

textJustify

Justify text

Size

Size props for controlling component dimensions

xs

Extra small size

sm

Small size

md

Medium size (default)

lg

Large size

xl

Extra large size

Hide

Hide props for responsive element visibility

mobileHide

Hide element on mobile devices and below (max-mobile: 48rem)

tabletHide

Hide element on tablet devices and below (max-tablet: 64rem)

desktopHide

Hide element on desktop devices and below (max-desktop: 80rem)

Items

Items props for controlling flex item alignment (align-items)

itemsStart

Align items to start (top/left)

itemsEnd

Align items to end (bottom/right)

itemsCenter

Align items to center

itemsBaseline

Align items to baseline

itemsStretch

Stretch items to fill container

Justify

Justify props for controlling flex content alignment (justify-content)

justifyStart

Pack items toward the start of the main axis

justifyEnd

Pack items toward the end of the main axis

justifyCenter

Center items along the main axis

justifyBetween

Distribute items with space between them

justifyAround

Distribute items with space around them

justifyEvenly

Distribute items with equal space around them

justifyStretch

Stretch items to fill the main axis

justifyBaseline

Align items along their baseline on main axis

Position

Position props for controlling CSS position property

relative

Relative positioning

absolute

Absolute positioning

fixed

Fixed positioning

sticky

Sticky positioning

static

Static positioning

Display

Display props for controlling CSS display property

inline

Inline display - flows with text

block

Block display - takes full width, new line

inlineBlock

Inline-block display - inline but with block properties

flex

Flex display - flexbox container

inlineFlex

Inline-flex display - inline flexbox container

grid

Grid display - CSS grid container

inlineGrid

Inline-grid display - inline grid container

contents

Contents display - element's box is removed, children display as if parent didn't exist

table

Table display - behaves like table element

tableCell

Table-cell display - behaves like td element

hidden

Hidden display - element is not visible

Overflow

Overflow props for controlling content overflow behavior

overflowAuto

Auto overflow - show scrollbars if needed

overflowHidden

Hidden overflow - clip content without scrollbars

overflowClip

Clip overflow - hard clip without scrollbars

overflowVisible

Visible overflow - content extends beyond bounds

overflowScroll

Scroll overflow - always show scrollbars

overflowXAuto

Auto overflow on X-axis only

overflowYAuto

Auto overflow on Y-axis only

overflowXHidden

Hidden overflow on X-axis only

overflowYHidden

Hidden overflow on Y-axis only

overflowXClip

Clip overflow on X-axis only

overflowYClip

Clip overflow on Y-axis only

overflowXVisible

Visible overflow on X-axis only

overflowYVisible

Visible overflow on Y-axis only

overflowXScroll

Scroll overflow on X-axis only

overflowYScroll

Scroll overflow on Y-axis only

Wrap

Wrap props for controlling flex wrapping behavior

flexWrap

Allow flex items to wrap to new lines when container is too narrow

flexNoWrap

Force flex items to stay on single line (may overflow)

flexWrapReverse

Wrap flex items in reverse order (last items wrap first)

Gap

Gap props for controlling spacing between children

gap

Enable gap spacing between children

noGap

Disable gap spacing

Flex Direction

Flex direction props for controlling flex layout direction

row

Flex direction row (horizontal)

column

Flex direction column (vertical)

rowReverse

Flex direction row-reverse

columnReverse

Flex direction column-reverse

Reverse

Reverse props for reversing child order

reverse

Reverse the order of children

Breakpoint

Breakpoint props for responsive layout changes

mobileCol

Switch to column layout on mobile and below (max-mobile: 48rem)

tabletCol

Switch to column layout on tablet and below (max-tablet: 64rem)

desktopCol

Switch to column layout on desktop and below (max-desktop: 80rem)

Appearance

Appearance props for controlling component colors

primary

Primary color appearance (gray)

brand

Brand color appearance (blue)

accent

Accent color appearance (rose)

secondary

Secondary color appearance (gray)

tertiary

Tertiary color appearance

success

Success color appearance (green)

danger

Danger color appearance (red)

warning

Warning color appearance (amber)

info

Info color appearance (cyan)

link

Link color appearance (blue, for hyperlinks)

Border

Border props for controlling component borders

border

Enable border on all sides

borderT

Enable border on top

borderB

Enable border on bottom

borderL

Enable border on left

borderR

Enable border on right

borderX

Enable border on left and right

borderY

Enable border on top and bottom

noBorder

Disable all borders

Shadow

Shadow props for controlling drop shadows

shadow

Enable drop shadow

noShadow

Disable drop shadow

Ring

Ring props for controlling focus rings

ring

Enable focus ring

noRing

Disable focus ring

Shape

Shape props for controlling component border radius

pill

Fully rounded corners (circular)

sharp

No rounded corners (square)

rounded

Medium rounded corners (default)

Padding

Padding props for controlling internal spacing

padding

Enable internal padding

noPadding

Disable internal padding

Variant

Variant props for controlling component style variations

filled

Filled variant - solid background with contrasting text color

outline

Outline variant - transparent background with border and colored text (default)

Transparent

Transparent prop for disabling background color

transparent

Disable background color - makes component background transparent

Responsive

Responsive prop for enabling breakpoint-specific sizing

responsive

Enable responsive sizing - uses breakpoint-specific classes for font size, padding, and gap