Render Element
Last updated on
3 June 2024
Provides a render element for any Iconify Icon, with properties and value.
Properties:
- #icon: The icon name to output.
- #settings: (array, optional) Iconify attributes to apply to the icon.
- width: Sets the width of the icon (e.g.: 50)
- height: Sets the height of the icon (e.g.: 50)
- color: Sets the color of the icon (e.g.: '#000')
- flip: Flips the icon horizontally or vertically (e.g.: 'vertical')
- vertical
- horizontal
- rotate: Rotates the icon by a specified degree (e.g.: '90)
- 90 degrees
- 180 degrees
- 270 degrees
Usage example:
$form['iconify_icon_render_element'] = [
'#type' => 'iconify_icon',
'#icon' => 'pineapple (openmoji)',
'#settings' => [
'width' => 50,
'height' => 50,
'color' => '#000',
'flip' => 'vertical',
'rotate' => '90',
],
];Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion