Setting.setIcon method
Setting › setIcon
Unofficial
Set the icon of the setting, shown at the start of the row before the info section.Creates Setting.iconEl on the first call. Passing
null or an empty string empties that element instead of removing it.Signature:
setIcon(icon: string | null): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| icon | string | null | ID of the icon, can use any icon loaded with {@link obsidian#addIcon} or from the inbuilt library. |
Returns: this — The setting.
Example:
setting.setIcon('dice');