Free
Pro

Icon

base-icon is easy way to add vector icons to your project. Use name="" to add preferred icon. Base theme has Base Icon Pack of 145 carefully curated icons. As well this way gives opportunity to add custom icons to your project. In this tutorial you can check how to do that.

free

Default Icon

Default icon example below.


HTML

Icon Color

Base Icon Pack is build with stroked icons. To control the color, use any color from Tailwindcss color palette classes with "stroke", for example class="stroke-slate-700".


HTML

Icon Size

Use Talwindcss classes width w- and height h- to control the icon size. It is mandatory to add equal values. There is no limits for preferred size


HTML

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add icon

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add icon
// Paths are relative to aliases.components (default: src/app/components)
import { IconComponent } from './icon/icon.component';

@Component({
  selector: 'app-your-component',
  imports: [
    IconComponent
  ],
  template: `...`
})
export class YourComponent {}

API for icon — generated from JSDoc in the library source.

API reference for icon
APIMemberTypeDefaultDescription
base-iconclassstring''Additional host CSS classes (merged via cn()).
base-iconnamestring | undefined''
base-iconpathunknown'assets/icons.svg'
base-iconcolorstring''
base-iconsizestring | number''
base-iconfilledbooleanfalseRenders the solid variant from `filledPath` instead of the outline sprite.
base-iconfilledPathunknown'assets/icons-filled.svg'Sprite used when `filled` is true. Its symbols must use `fill="currentColor"`, not `fill="none"`.