We are currently in alpha version.
Please expect changes. If you find any issues, please report them on our github.
Chip
Chips are compact UI elements that display information, categorize content, or trigger actions. They provide a quick, interactive way to represent choices, tags, or statuses, enhancing user engagement and navigation.
Basic chip
html
Optional properties
Property | Type | Description |
---|---|---|
|
| Defines the chip style. |
|
| Controls chip sizing. |
|
| Defines the chip shape. |
|
| Defines the chip type. |
| string | Specifies the chip's text. |
| string | Specifies a Font Awesome class for the chip's icon (e.g., |
|
| Sets the icon's position relative to the chip text. Defaults to |
| boolean | Disables the chip. Default is |
| boolean | Provides the ability to dismiss the chip. Default is |
| string | Allows overriding default styles by passing Tailwind CSS classes. Utilize the |
Supported directives
Selector | Directive name | Description |
---|---|---|
| ZapIconDirective | A directive that enables adding any type of icon to a chip, including SVGs, font-based icons, and more. |
Example
Preview
Code
Global configurations
A list of global styles, including shape, size, color, font sizes, font weights, and letter spacing can be provided via themeLibrary
in the provideZapOption
provider.. If you have multi theme setup, you can also provide theme specific colors. These apply to all default variants through out the app unless component level styles are provided.
Example
app.config.ts
Shape and Size
Property | Description |
---|---|
| Defines the shape of the chip. Can be |
| Defined the size of the chip. Can be |
Colors
You can provide each of these colors for different themes that you use
Property | Description |
---|---|
| Background color of the chip. |
| Text color of the chip. |
| Border color of the chip. |
| Background color of the chip when hovered. |
| Text color of the chip when hovered. |
| Border color of the chip when hovered. |
| Color of the dismiss element of the chip. |
| Color of the dismiss element of the chip when hovered. |
Other styles
You can provide a bunch of other styles, that are not theme based but rather generic
Property | Description |
---|---|
| Defines the radius of the chip's corners. |
| Left padding of the chip. |
| Right padding of the chip. |
| Top padding of the chip. |
| Bottom padding of the chip. |
| Padding around the chip's content. |
| Width of the chip. |
| Height of the chip. |
| Font size of the chip's text. |
| Font weight of the chip's text. |
| Line height of the chip's text. |
| Letter spacing of the chip's text. |
| Transforms the chip's text (e.g., uppercase, lowercase). |