Lapikit

Icon component

Icon

The Icon component is used to display icons in the interface, with fine customization: color, size, visual status (info, success, etc.), and rounded styles. It can be easily integrated into all other Lapikit components, or used on its own as a decorative or interactive element.

Examples of icon

Base

Minimal example of an Icon with default configuration. Perfect for displaying a simple icon with a neutral style.

Color

Allows you to change the icon’s color via prop color. Useful for adapting an icon to its context (e.g. theme, visual feedback…).

State

Displays different visual variants depending on the status (error, info, warning, success). These props automatically add a style corresponding to the desired visual state.

Type

Shows the two possible types of HTML elements (<i> or <div>) according to prop is, useful for adapting to certain frameworks or accessibility constraints.

pizza icon
svelte icon

Size

Demonstration of prop size to adjust icon size. It can be a simple string (e.g. md) or a CSS object for a completely customized size.

Disabled

Example of an icon rendered inactive, visually dimmed and non-interactive. Ideal for indicating that an action is not available.

pizza icon
svelte icon

API Reference

propstypedescriptiondefaulttype_extend
ref $bindableHTMLElementDirect access to DOM elementundefined
isenumHTML tag used to render icon (i, div, etc.)ii | div
darkbooleanEnable dark theme for component.false
lightbooleanEnable light theme for the component.false
colorstringApplies a custom color to text or icons.undefined
backgroundstringApply a custom background color.undefined
disabledbooleanMakes the icon inactive and visually dimmedfalse
warningbooleanApply a visual style of warning.false
infobooleanApplies an informative style.false
successbooleanApply a success style (confirmation, validation, etc.).false
errorbooleanApply a visual style of error.false
sizeenum | {enum: enum}Set Icon size: xs, sm, md, lg, xl or full.mdxs | sm | md | lg | xl | full

Variables CSS

variabledefaultdescription
–-icon-color–-kit-on-surfaceIcon color

Add Icons to your Buttons, Cards or Chips to visually guide your users.

©2025 Lapikit.

Made with by Nycolaide