--- hide_title: true hide_table_of_contents: true title: Icon node --- <##head##> # Icon This node places an icon in the visual tree.
![](/nodes/basic-elements/icon/icon.png)
You can use an icon from the built in library, or provide your own image source. <##head##> ## Dynamic icons If you want to dynamically pass an icon from the icon library to the **Icon** node you do this through the Icon Source input. This input expects an object with a **class** (being the name of the icon library) and **code** (being the icon code that you see when you hover an icon in the icon picker). The easiest way of transforming a string to an icon object is to use a custom function containing the following code: ```js Outputs.iconObject = { "class": "material-icons", "code": Inputs.iconCode, }; ``` This will automatically create an iconCode input and an iconObject output. ## Inputs | Data | Description | | --------------------------------------------- | --------------------------------------------------------------------------------------------------- | | Type | Use this to set if you want to use a predefined `icon` or a custom `image` from the project folder. | | Icon Source | Where to get the icon. | | Size | The width of the icon in `px`. | | Color | Sets the color of the icon. Only visible if _Type_ is set to `icon`. | ### Visual This node supports the following [Visual Input Properties](/nodes/shared-props/inputs/visual-input-properties): - [Margin](/nodes/shared-props/inputs/visual-input-properties#margin) - [Padding](/nodes/shared-props/inputs/visual-input-properties#padding) - [Alignment](/nodes/shared-props/inputs/visual-input-properties#alignment) - [Layout, Position](/nodes/shared-props/inputs/visual-input-properties#-position) - [Style](/nodes/shared-props/inputs/visual-input-properties#style) - [Placement](/nodes/shared-props/inputs/visual-input-properties#placement) - [Advanced HTML](/nodes/shared-props/inputs/visual-input-properties#advanced-html) ## Outputs This node supports the following [Visual Output Properties](/nodes/shared-props/outputs/visual-output-properties): - [Bounding Box](/nodes/shared-props/outputs/visual-output-properties#bounding-box) - [Mounted](/nodes/shared-props/outputs/visual-output-properties#mounted) - [Other](/nodes/shared-props/outputs/visual-output-properties#other)
@include "../../shared-props/inputs/_visual-input-properties.md" @include "../../shared-props/outputs/_visual-output-properties.md"