---
title: Icons
description: Built-in Lucide mask icons, Icon component, component icon props,
  and interactive icon gallery.
package: moraine
version: 0.11.0
repository: https://github.com/subframe7536/moraine
---

# Icons

> Built-in Lucide mask icons, Icon component, component icon props, and interactive icon gallery.

Moraine provides built-in CSS mask styles for Lucide icons. Mask icons render as pure CSS and inherit the current text color and font size, so no runtime SVG is loaded.

## Zero-Config Setup

To enable built-in icons, import Moraine's icon stylesheet in your main application entry:

```css title="src/index.css"
@import 'moraine/icon.css';
```

The stylesheet puts its rules in the `components` cascade layer and sizes each icon at `1.2em`.
`<Icon>` renders every icon in a `span`, and a size utility such as `size-4` on the icon overrides
that size in both UnoCSS and Tailwind. For a JSX or component icon, Icon renders a `1.2em` `span`
that the graphic fills.

## The `<Icon>` Component

Render standalone icons with the `<Icon>` component:

```tsx
import { Icon } from 'moraine'

export function SearchIndicator() {
  return <Icon name="icon-search" class="text-primary text-lg" />
}
```

## Component Icon Props

`Button` and `Badge` accept `leading` and `trailing` icon props, as do `Select`, `Combobox`, and `MultiSelect`. `Tabs` items take an `icon`. To add an icon to an `Input`, wrap it in `InputGroup`:

```tsx
import { Button, Icon, Input, InputGroup } from 'moraine'

export function SearchBar() {
  return (
    <div class="flex items-center gap-2">
      <InputGroup>
        <InputGroup.Leading>
          <Icon name="icon-search" />
        </InputGroup.Leading>
        <Input aria-label="Search components" placeholder="Search components..." />
      </InputGroup>
      <Button leading="icon-plus" variant="solid">
        New Item
      </Button>
    </div>
  )
}
```

The published stylesheet includes Moraine's semantic aliases such as `icon-search` and `icon-chevron-down`. Other names, such as `i-lucide-search`, need their own CSS generator, for example UnoCSS's `presetIcons()` with the Lucide collection. Passing an icon name does not load its CSS.

## Icon Gallery

Browse the built-in `icon-*` aliases below. Click an icon to copy its name to your clipboard:

- `icon-arrow-down`
- `icon-arrow-left`
- `icon-arrow-right`
- `icon-arrow-up`
- `icon-arrow-up-down`
- `icon-caution`
- `icon-check`
- `icon-chevron-double-left`
- `icon-chevron-double-right`
- `icon-chevron-down`
- `icon-chevron-left`
- `icon-chevron-right`
- `icon-chevron-up`
- `icon-close`
- `icon-copy`
- `icon-copy-check`
- `icon-dark`
- `icon-drag`
- `icon-ellipsis`
- `icon-error`
- `icon-external`
- `icon-eye`
- `icon-eye-off`
- `icon-file`
- `icon-folder`
- `icon-folder-open`
- `icon-hash`
- `icon-info`
- `icon-light`
- `icon-loading`
- `icon-menu`
- `icon-minus`
- `icon-panel-close`
- `icon-panel-open`
- `icon-plus`
- `icon-reload`
- `icon-search`
- `icon-stop`
- `icon-success`
- `icon-system`
- `icon-tip`
- `icon-upload`
- `icon-warning`

