Icon¶
Icon draws a Lucide icon or any other image. It is an ImageLabel.
Usage¶
Call Components.Icon with a scope and a table of properties:
Unknown icons¶
If Name is not a Lucide icon, the component warns unknown Lucide icon and draws nothing.
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
LayoutOrder |
UsedAs<number> |
0 |
Position in a parent UIListLayout or UIGridLayout. |
|
Size |
UsedAs<UDim2> |
UDim2.fromOffset(IconSize, IconSize) |
Size of the component. | |
Visible |
UsedAs<boolean> |
true |
Whether the component is shown. | |
ZIndex |
UsedAs<number> |
- | Z index of the component. | |
Name |
string?, -- Lucide icon id |
- | Name of a Lucide icon. | |
Image |
string |
- | Asset ID of an image. It takes priority over Name. |
|
Color |
UsedAs<Color3> |
Colors.OnSurface |
Colour of the icon. | |
IconSize |
number |
24 |
Width and height, in pixels. The component ignores it if you set Size. |
|
AssetSize |
number |
48 |
Resolution of the Lucide atlas to read the icon from, in pixels. Raise it for icons larger than 48 pixels. |