Chip

The Chip component in Velocify UI is a versatile UI element designed to display concise information, actions, or tags in a compact form. It supports different variants such as default, secondary, warning, success, info, and error, allowing for visual differentiation. Additionally, it can be customized with icons or avatars, and comes with various size options like small, default, and large. The component also supports a disabled state, making it flexible for different UI scenarios.

Chip Installation

chip.tsx

Basic Chip

Default
1<Chip variant="default">
2  Default
3</Chip>

Chip API Reference

Prop

Type

Default

className

string

-

children

React.ReactNode

-

icon

React.ReactNode

-

avatar

React.ReactNode

-

size

string

default

disabled

boolean

false

* Required

Prop

Types

size

default

small

large

variant

default

secondary

warning

success

info

error

custom

Disabled Chip

Disabled
1<Chip variant="default" disabled>
2  Disabled
3</Chip>

Chip - Sizes

Small
Default
Large
1<Chip variant="default" size="small">
2  Small
3</Chip>
4<Chip variant="default" size="default">
5  Default
6</Chip>
7<Chip variant="default" size="large">
8  Large
9</Chip>

Chip - Icon Variant

Icon Chip
1<Chip
2  variant="default"
3  avatar={
4    <Zap 
5      className="w-5 h-5" 
6    />
7}>
8  Icon Chip
9</Chip>

Chip - Avatar Variant

avatar
Avatar Chip
1<Chip
2  variant="default"
3  avatar={
4    <Avatar
5      alt={"avatar"}
6      src={"/avatarImage.png"}
7      width={20}
8      height={20}
9    />
10}>
11  Avatar Chip
12</Chip>

Chip - Style Variants

Secondary Variant

Secondary
1<Chip variant="secondary">
2  Secondary
3</Chip>

Error Variant

Error
1<Chip variant="error">
2  Error
3</Chip>

Warning Variant

Warning
1<Chip variant="warning">
2  Warning
3</Chip>

Success Variant

Success
1<Chip variant="success">
2  Success
3</Chip>

Info Variant

Info
1<Chip variant="info">
2  Info
3</Chip>

Velocify UI

Built by Rudra Patel. The repository is available on GitHub.