If value of icon property is a string and icon data is available, onLoad is called on first render.If value of icon property is an object, onLoad is not called.It is not an event, such as click event for links, it is a simple callback function. It is called when icon data has been loaded. OnLoad property is an optional callback function. These are not CSS transformations, transformations are applied inside SVG.įor more details see how to transform icon in Iconify for React. All transformations are done relative to the center of the icon. TransformationsĪn icon can be rotated and flipped horizontally and/or vertically. To add color to a monotone icon simply change text color.įor various ways to change icon dimensions, see how to change icon dimensions in Iconify for React. Some icons, such as emoji, have a hardcoded palette that cannot be changed. You can only change color of monotone icons. You can also add custom API providers for more icon choices. Browse icons sets to see all available icons. There are over 150,000 icons available from 100+ icon sets. For example, fa:arrow-left and fa-arrow-left are identical because " fa" does not contain hyphen. This is to support people migrating from icon fonts. If prefix does not contain " -", prefix and icon name can be separated with hyphen.If API provider is empty, it can be skipped (like in examples above).mdi-light:home - icon is " home" from Material Design Light icon set, from public Iconify API.flat-color-icons:voice-presentation - icon is " voice-presentation" from Flat Color Icons icon set, from public Iconify API.Icon name is a string, which has 3 provider points to API source. All other properties and events will be passed to generated SVG element, so you can do stuff like assigning onClick event, setting the inline style, add title and so on. In addition to the properties mentioned above, the icon component accepts any other properties and events. See below for more information on each optional property. ![]()
0 Comments
Leave a Reply. |