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:
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:
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:
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: