g-on-get-width event

Description: Called so you can provide dynamic width logic to the control.
Allows breakdown by screen size: Yes

Arguments:

Argument

Description

screenSize

The screen size for which the interface is being aligned.
It can be one of the following string values:

  • "xs" - Extra small screen size
  • "sm" - Small screen size
  • "md" - Medium screen size
  • "lg" - Large screen size
  • "xl" - Extra large screen size

Learn more about screen size breakdowns here

width

The default width that the grid system will use if the event does not return a new value.

To inform the grid system that you want to use a new width, you must return a number inside the event.

Example:

<form>
    <button text="Button 2" g="block" g-on-get-width="return 10 + 32 + 77;"/>   
</form>

In this example, the button's width will be equal to the sum calculated in Lua.