Description
When creating a button with createButton
, the button’s style can be customized individually. This is achieved by choosing icons (symbols), colors, and text. As a result, the button becomes visually appealing and can be clearly designed for different actions.
Style Arguments
Argument | Description |
---|---|
Icon |
The symbol displayed on the button. Smenso supports a variety of icons such as envelope , check-circle , plus , and more. |
borderColor |
The color of the button’s border. Supports color values like "red" , "blue" , or HEX values such as "#FF5733" . |
fillColor |
The background color of the button. Supports color values similar to borderColor . |
textColor |
The color of the text on the button. |
Text |
The button text that is displayed. It should be concise and descriptive, for example "Complete Project" or "Generate Document" . |
Examples
The following examples show how buttons can be styled. Please note that the actions in these examples are fictitious and must be replaced by actual functions or workflows in Smenso.
Description | Formula |
---|---|
Button with text, icon, and custom colors |
createButton( 1, "Generate Document", "Click to create a document", "GenerateDocument()", // fictitious function "blue", // Border color "lightblue", // Background color "white", // Text color "The document was successfully created", "", "file" ) |
Button with an icon and success message |
createButton( 1, "Complete Project", "Click to mark the project as completed", "MarkProjectAsCompleted()", // fictitious function "green", // Border color "#28a745", // Background color (HEX value) "white", // Text color "The project was successfully completed", "", "check-circle" ) |
Button with clear color design |
createButton( 1, "Create New Task", "Creates a new task in the project", "CreateNewTask()", // fictitious function "black", // Border color "yellow", // Background color "black", // Text color "The task was successfully created", "", "plus" ) |
Notes
- Icon Selection: It is advisable to use icons that visually support the purpose of the button. A list of supported icons can be found in the Font Awesome Icon Library.
- Clarity in Text: The button text should be short and concise so that users clearly understand its function.
- Color Design: Choose colors that are both aesthetically pleasing and functional (e.g., ensuring good text readability).
Comments
0 comments
Please sign in to leave a comment.