Perspective - Icon
Component Palette Icon:
Description​
The Icon component provides access to a collection of Scalable Vector Graphic (SVG) images, chosen to be useful as icons in a Perspective session.
The materials icon library is a primary source for icons, see https://fonts.google.com/icons?selected=Material+Icons. You can also add your own custom repository of icons. For more information on icons, see Images and Icons in Perspective.
When attempting to change the color of an icon via style class, set the desired color using the Text category's Color property.
Properties​
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
| Name | Description | Property Type |
|---|---|---|
| path | Shorthand path to icon source, in format: library/IconName (e.g., material/3d_rotation). See Icons for more information about available icons. | value: string |
| color | Color of the icon. See Color Selector. | color |
| style | Use Style to customize the visual style of the component. The Style menu contains all the tools for modifying text, background, margins, and borders. You can also specify a style class. | object |
Component Scripts and Events​
Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:
- Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.
- Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.
Examples​
Example 1​
| Property | Value |
|---|---|
| props.color | #00AC00 |
Example 2​
| Property | Value |
|---|---|
| props.path | material/record_voice_over |
| props.color | #000088 |
| props.style.borderstyle | ridge |
| props.style.borderColor | #FFAC47 |
| props.style.borderWidth | 6px |