All pages
Powered by GitBook
1 of 58

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

CreateActionTriggerParams


Properties

actionTrigger

actionTrigger:


placement?

optional placement: { after: string; } | { before: string; } | { at: "start" | "end"; }

CreateFeatureActionParams


Properties

action

action:


placement?

optional placement: { after: string; } | { before: string; } | { at: "start" | "end"; }

PlacementForUIElement


PlacementForUIElement: { after: string; } | { before: string; } | { at: "start" | "end"; }

Used in to specify the position of a panel in the stack and in to specify the position of an element in a panel.

In both cases, the default value is { at: "end" }

DeletePanelElementsParams


Properties

panelId

panelId

:
string

elements

elements: string[]

UIActionTriggerCreate
UIFeatureActionCreate
.
UiController.createOrUpdatePanel
UiController.createPanelElements

OnMapInteractionsOptions


The options for which parts of the Felt UI can be shown when interacting with features and elements on the map.

Switching these off can be useful if you add your own click, selection or hover handlers for features and elements.

Properties

featureSelectPanel?

optional featureSelectPanel: boolean

Set this to false to prevent the panel that shows information about a selected feature from being shown.


featureHoverPanel?

optional featureHoverPanel: boolean

Set this to false to prevent the panel that shows information about a hovered feature from being shown.


elementSelectPanel?

optional elementSelectPanel: boolean

Set this to false to prevent the panel that shows information about a selected element from being shown.


linkClickOpen?

optional linkClickOpen: boolean

Set this to false to prevent clicking on a map link element from opening that link in a new tab or window.


imageLightboxOpen?

optional imageLightboxOpen: boolean

Set this to false to prevent clicking on an image element from opening the image in a lightbox.

CreateOrUpdatePanelParams


The parameters for creating or updating a panel by using UiController.createOrUpdatePanel.

Properties

panel

panel:

The panel to add.


placement?

optional placement: { after: string; } | { before: string; } | { at: "start" | "end"; }


initialPlacement?

optional initialPlacement: { after: string; } | { before: string; } | { at: "start" | "end"; }

The placement of the panel on the right sidebar stack.

Default Value

{ at: "end" }

UIActionTriggerCreate


Represents an action trigger. It can be added to the map by using the method.

Properties

label

UI


The UI part of the Felt SDK allows you to enable and disable certain UI features such as the legend and the full screen button.

Controller

UIPanelCreateOrUpdate

label: string

The label of the action trigger.


onTrigger()

onTrigger: (args: { id: string; }) => void

The function to call when the action trigger is triggered.

Parameters

Parameter
Type
Description

args

{ id: string; }

The arguments passed to the function.

args.id

string

The id of the action trigger.

Returns

void


id?

optional id: string


disabled?

optional disabled: boolean

Whether the action trigger is disabled or not.


type?

optional type: undefined


onCreate()?

optional onCreate: (args: { id: string; }) => void

A function to call when the element is created.

Parameters

Parameter
Type
Description

args

{ id: string; }

The arguments passed to the function.

args.id

string

The id of the element.

Returns

void


onDestroy()?

optional onDestroy: (args: { id: string; }) => void

A function to call when the element is destroyed.

Parameters

Parameter
Type
Description

args

{ id: string; }

The arguments passed to the function.

args.id

string

The id of the element.

Returns

void

UiController.createActionTrigger

UIPanelElementUpdate


UIPanelElementUpdate: UIButtonElementUpdate | UITextElementUpdate | UITextInputElementUpdate | UISelectElementUpdate | UIDividerElementUpdate | UIButtonRowElementUpdate | UICheckboxGroupElementUpdate | UIRadioGroupElementUpdate | UIToggleGroupElementUpdate | UIGridContainerElementUpdate | UIFlexibleSpaceElementUpdate | UIIframeElementUpdate

This is a union of all the possible elements that can be updated inside panel's body or footer (excluding Divider and FlexibleSpace elements because they cannot be updated).

Remarks

id and type are required to identify the element to update.

UIPanelElement


UIPanelElement: UIButtonElement | UITextElement | UIDividerElement | UITextInputElement | UISelectElement | UIFlexibleSpaceElement | UIButtonRowElement | UICheckboxGroupElement | UIRadioGroupElement | UIToggleGroupElement | UIIframeElement | UIGridContainerElement

Interfaces
  • CreateActionTriggerParams

  • UpdateActionTriggerParams

  • CreateFeatureActionParams

  • UpdateFeatureActionParams

Type Aliases

  • PlacementForUIElement

  • UIPanelElement

  • UIPanelElementCreate

  • UIPanelElementUpdate

UiController

UIButtonElement


Represents a button element in a panel.

Button variants

Example

Properties

type

type: "Button"


label

label: string

The label to display in the button.


onClick()

onClick: (args: { id: string; }) => void

The action to perform when the button is clicked.

Parameters

Parameter
Type
Description

Returns

void


id

id: string

The ID of the element.


variant?

optional variant: "filled" | "transparent" | "outlined"

The style variant of the button.

  • "filled": a button with background.

    • background color is based on button's tint (defaults to default tint)

  • "transparent"

Default Value

"filled"


tint?

optional tint: "default" | "primary" | "accent" | "danger"

The tint of the button.

  • "default": Felt's theme-based light/dark colors.

  • "primary": Felt's primary color (pink).

  • "accent": Felt's accent color (blue).

Default Value

"default"


disabled?

optional disabled: boolean

Whether the button is disabled.

Default Value

false


onCreate()?

optional onCreate: (args: { id: string; }) => void

A function to call when the element is created.

Parameters

Parameter
Type
Description

Returns

void


onDestroy()?

optional onDestroy: (args: { id: string; }) => void

A function to call when the element is destroyed.

Parameters

Parameter
Type
Description

Returns

void

UIButtonElementCreate


The parameters for creating a button element.

See UIButtonElement for more details.

Remarks

id is optional but recommended if you want to be able to perform updates.

Properties

type

type: "Button"


label

label: string

The label to display in the button.


onClick()

onClick: (args: { id: string; }) => void

The action to perform when the button is clicked.

Parameters

Parameter
Type
Description

Returns

void


variant?

optional variant: "filled" | "transparent" | "outlined"

The style variant of the button.

  • "filled": a button with background.

    • background color is based on button's tint (defaults to default tint)

  • "transparent"

Default Value

"filled"


tint?

optional tint: "default" | "primary" | "accent" | "danger"

The tint of the button.

  • "default": Felt's theme-based light/dark colors.

  • "primary": Felt's primary color (pink).

  • "accent": Felt's accent color (blue).

Default Value

"default"


disabled?

optional disabled: boolean

Whether the button is disabled.

Default Value

false


onCreate()?

optional onCreate: (args: { id: string; }) => void

A function to call when the element is created.

Parameters

Parameter
Type
Description

Returns

void


onDestroy()?

optional onDestroy: (args: { id: string; }) => void

A function to call when the element is destroyed.

Parameters

Parameter
Type
Description

Returns

void


id?

optional id: string

The ID of the element.

Remarks

If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

If provided, it must be unique within the UI.

Default Value

undefined

UpdatePanelElementsParams


Properties

panelId

panelId: string

The ID of the panel to update.


elements

elements: { element: ; }[]

Dictionary of element IDs to the element to update.

Name
Type

UIFlexibleSpaceElementUpdate


The parameters for updating a flexible space element.

See for more details.

Remarks

id and type are required to identify the element to update.

UIControlElementOption


An option to display in a control element.

Control elements are elements that allow the user to select one or more values from a list of options. This includes:

UiControlsOptions


Properties

showLegend?

optional

UIPanelElementCreate


UIPanelElementCreate: | | | | | | | | | | |

This is a union of all the possible elements that can be created inside panel's body or footer.

Remarks

For the sake of convenience, id

{
  type: "Button",
  label: "Click me",
  onClick: () => alert("Button clicked"),
}
: a transparent button that gets a subtle dark background when hovered.
  • text color is based on button's tint (defaults to default tint)

  • "outlined": a transparent button with a border.

    • text and border colors are based on button's tint (defaults to default tint)

  • "danger": Felt's danger color (red).

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the button.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    CreateOrUpdatePanelParams
    CreatePanelElementsParams
    UpdatePanelElementsParams
    DeletePanelElementsParams
    UiControlsOptions
    OnMapInteractionsOptions
    UIActionTriggerCreate
    UIButtonElement
    UIButtonElementCreate
    UIButtonElementUpdate
    UIButtonRowElement
    UIButtonRowElementCreate
    UIButtonRowElementUpdate
    UICheckboxGroupElement
    UICheckboxGroupElementCreate
    UICheckboxGroupElementUpdate
    UIDividerElement
    UIDividerElementCreate
    UIDividerElementUpdate
    UIFeatureActionCreate
    UIFeatureAction
    UIFlexibleSpaceElement
    UIFlexibleSpaceElementCreate
    UIFlexibleSpaceElementUpdate
    UIGridContainerElement
    UIGridContainerElementCreate
    UIGridContainerElementUpdate
    UIIframeElement
    UIIframeElementCreate
    UIIframeElementUpdate
    UIPanel
    UIPanelCreateOrUpdate
    UIRadioGroupElement
    UIRadioGroupElementCreate
    UIRadioGroupElementUpdate
    UISelectElement
    UISelectElementCreate
    UISelectElementUpdate
    UITextElement
    UITextElementCreate
    UITextElementUpdate
    UITextInputElement
    UITextInputElementCreate
    UITextInputElementUpdate
    UIToggleGroupElement
    UIToggleGroupElementCreate
    UIToggleGroupElementUpdate
    UIControlElementOption

    element

    UIPanelElementUpdate

    UIPanelElementUpdate
    Properties

    type

    type: "FlexibleSpace"


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    UIFlexibleSpaceElement
    is optional but recommended if you want to be able to perform updates.
    UIButtonElementCreate
    UITextElementCreate
    UIDividerElementCreate
    UITextInputElementCreate
    UISelectElementCreate
    UIFlexibleSpaceElementCreate
    UIButtonRowElementCreate
    UICheckboxGroupElementCreate
    UIRadioGroupElementCreate
    UIToggleGroupElementCreate
    UIIframeElementCreate
    UIGridContainerElementCreate
    : a transparent button that gets a subtle dark background when hovered.
    • text color is based on button's tint (defaults to default tint)

  • "outlined": a transparent button with a border.

    • text and border colors are based on button's tint (defaults to default tint)

  • "danger": Felt's danger color (red).

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the button.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Button variants

    UISelectElement

    The option can be disabled by setting the disabled property to true.

    Examples

    A disabled option

    Properties

    label

    label: string


    value

    value: string


    disabled?

    optional disabled: boolean

    UIRadioGroupElement
    UICheckboxGroupElement
    UIToggleGroupElement
    showLegend
    :
    boolean

    Whether or not the legend is shown.

    Default Value


    cooperativeGestures?

    optional cooperativeGestures: boolean

    When co-operative gestures are enabled, the pan and zoom gestures are adjusted to work better when the map is embedded in another page.

    Remarks

    On mobile devices, enabling co-operative gestures will allow the user to pan past the embedded map with a single finger drag. To pan the map, they must use two fingers.

    On desktop devices, enabling co-operative gestures allows the user to scroll past the embedded map using their scroll wheel or trackpad. To zoom the map, they must hold the Ctrl (Windows) or Command key (Mac) while scrolling.

    Default Value


    fullScreenButton?

    optional fullScreenButton: boolean

    Whether or not the full screen button is shown in an embedded map.

    Remarks

    When clicked, this will open the map in a new tab or window.

    Default Value


    geolocation?

    optional geolocation: boolean

    Whether or not the geolocation button is shown in an embedded map.

    Remarks

    The geolocation feature will plot your position on the map. If you click the button again, it will start tracking your position.

    Default Value


    zoomControls?

    optional zoomControls: boolean

    Whether or not the zoom controls are shown in an embedded map.

    Remarks

    This does not affect whether or not the map can be zoomed, just the display of the zoom controls in the bottom right corner of the map.

    Default Value


    scaleBar?

    optional scaleBar: boolean

    Whether or not the scale bar is shown in an embedded map.

    Default Value

    { label: "Option A", value: "optionA" }
    { label: "Option A", value: "optionA", disabled: true }
    true
    true
    true
    false
    true
    true

    UIButtonRowElementCreate


    The parameters for creating a button row element.

    See UIButtonRowElement for more details.

    Properties

    type

    type: "ButtonRow"


    items

    items: []

    The items to add to the button row.


    align?

    optional align: "start" | "end"

    The alignment of the button row.

    Default Value

    "start"


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UIButtonRowElementUpdate


    The parameters for updating a button row element.

    See UIButtonRowElement for more details.

    Properties

    type

    type: "ButtonRow"


    id

    id: string

    The ID of the element.


    align?

    optional align: "start" | "end"

    The alignment of the button row.

    Default Value

    "start"


    items?

    optional items: []

    The items to add to the button row.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UICheckboxGroupElementUpdate


    The parameters for updating a checkbox group element.

    See UICheckboxGroupElement for more details.

    Properties

    type

    type: "CheckboxGroup"


    id

    id: string

    The ID of the element.


    value?

    optional value: string[] = valueSchema

    The value of the checkbox group.

    Default Value

    []


    options?

    optional options: []

    The options to display in the checkbox group.


    onChange()?

    optional onChange: (args: { value: string[]; id: string; }) => void

    The function to call when the value of the checkbox group changes.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UIFlexibleSpaceElement


    Represents a flexible space element in a container.

    When rendered...

    • inside UIGridContainerElement, it will add extra gap between items. It can be controlled by grid property.

    • inside UIPanelElement body or footer, since they work as vertically stacks, it will add extra gap between items.

    Examples

    Paragraphs with a flexible space between makes them more visually separated.

    Horizontal stack of buttons with a flexible space between makes them more visually separated.

    Properties

    type

    type: "FlexibleSpace"


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIIframeElementCreate


    The parameters for creating an iframe element.

    See UIIframeElement for more details.

    Remarks

    id is optional but recommended if you want to be able to perform updates.

    Properties

    type

    type: "Iframe"


    url

    url: string

    The URL of the iframe.


    height?

    optional height: string | number

    The height of the iframe.

    If not provided, the height will be automatically calculated following a 16:9 ratio.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined

    UIIframeElementUpdate


    The parameters for updating an iframe element.

    See UIIframeElement for more details.

    Remarks

    id and type are required to identify the element to update.

    Properties

    type

    type: "Iframe"


    id

    id: string

    The ID of the element.


    height?

    optional height: string | number

    The height of the iframe.

    If not provided, the height will be automatically calculated following a 16:9 ratio.


    url?

    optional url: string

    The URL of the iframe.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIDividerElement


    Represents a divider element in a panel. This element is used to separate other elements in a panel. It is rendered as a gray horizontal line of 1px height.

    Example

    Divider element is useful to separate sections of a panel.

    Properties

    type

    type: "Divider"


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIDividerElementCreate


    The parameters for creating a divider element.

    See UIDividerElement for more details.

    Remarks

    id is optional but recommended if you want to be able to delete the element.

    Properties

    type

    type: "Divider"


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined

    UIFlexibleSpaceElementCreate


    The parameters for creating a flexible space element.

    Remarks

    id is optional but recommended if you want to be able to perform updates.

    Properties

    type

    type: "FlexibleSpace"


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined

    UITextElementUpdate


    The parameters for updating a text element.

    See UITextElement for more details.

    Remarks

    id and type are required to identify the element to update.

    Properties

    type

    type: "Text"


    id

    id: string

    The ID of the element.


    content?

    optional content: string

    The text to display in the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UICheckboxGroupElement


    The parameters for creating a checkbox group element.

    The checkbox group is a control that allows the user to select one or more values from a list of options.

    As a control, the checkbox group can have a label displayed above the checkboxes.

    If no value is provided, value is [], the checkbox group will be empty.

    UISelectElementCreate


    The parameters for creating a select element.

    See for more details.

    Remarks

    id is optional but recommended if you want to be able to perform updates.

    UIFeatureAction


    Represents a feature action after creation (with generated id).

    Properties

    label

    UIToggleGroupElementUpdate


    The parameters for updating a toggle group element.

    See for more details.

    Properties

    UpdateActionTriggerParams


    Properties

    id

    id

    UIIframeElement


    Represents an iframe element in a panel.

    The height of the iframe can be set by using the height property either as a number (measured in pixels) or a string (e.g. “100px” or “50%“).

    By default, the height is calculated following a 16:9 ratio.

    Properties

    CreatePanelElementsParams


    Properties

    panelId

    panelId

    {
      body: [
        { type: "Text", content: "Contact" },
        { type: "TextInput", placeholder: "Enter your name", ... },
        { type: "TextInput", placeholder: "Enter your email", ... },
        { type: "Divider" },
        { type: "Text", content: "Address" },
        { type: "TextInput", placeholder: "Enter your address", ... },
      ],
    }
    :
    string

    label?

    optional label: string

    The label of the action trigger.


    disabled?

    optional disabled: boolean

    Whether the action trigger is disabled or not.


    type?

    optional type: undefined


    onTrigger()?

    optional onTrigger: (args: { id: string; }) => void

    The function to call when the action trigger is triggered.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the action trigger.

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIButtonElementCreate

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIButtonElementCreate

    args

    { value: string[]; id: string; }

    The arguments passed to the function.

    args.value

    string[]

    Array of the selected values.

    args.id

    string

    The id of the checkbox group element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIControlElementOption
    Properties

    type

    type: "Select"


    options

    options: UIControlElementOption[]

    The options to display in the select.


    onChange()

    onChange: (args: { value: string; id: string; }) => void

    The function to call when the value of the select changes.

    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the select.

    args.id

    string

    The id of the select element.

    Returns

    void


    value?

    optional value: string

    The value of the select.


    placeholder?

    optional placeholder: string

    The placeholder text to display in the select.


    search?

    optional search: boolean

    Whether the select should allow searching through the options.

    Default Value

    false


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UISelectElement
    type

    type: "ToggleGroup"


    id

    id: string

    The ID of the element.


    alignment?

    optional alignment: "start" | "end"

    The alignment of the toggle group.

    Default Value

    "start"


    value?

    optional value: string[] = valueSchema

    The value of the toggle group.

    Default Value

    []


    options?

    optional options: UIControlElementOption[]

    The options to display in the toggle group.


    onChange()?

    optional onChange: (args: { value: string[]; id: string; }) => void

    The function to call when the value of the toggle group changes.

    Parameters

    Parameter
    Type
    Description

    args

    { value: string[]; id: string; }

    The arguments passed to the function.

    args.value

    string[]

    Array of the selected values.

    args.id

    string

    The id of the toggle group element.

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UIToggleGroupElement

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Properties

    type

    type: "CheckboxGroup"


    value

    value: string[] = valueSchema

    The value of the checkbox group.

    Default Value

    []


    options

    options: UIControlElementOption[]

    The options to display in the checkbox group.


    onChange()

    onChange: (args: { value: string[]; id: string; }) => void

    The function to call when the value of the checkbox group changes.

    Parameters

    Parameter
    Type
    Description

    args

    { value: string[]; id: string; }

    The arguments passed to the function.

    args.value

    string[]

    Array of the selected values.

    args.id

    string

    The id of the checkbox group element.

    Returns

    void


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    Checkbox group basic
    A checkbox group with a label
    type

    type: "Iframe"


    url

    url: string

    The URL of the iframe.


    id

    id: string

    The ID of the element.


    height?

    optional height: string | number

    The height of the iframe.

    If not provided, the height will be automatically calculated following a 16:9 ratio.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    Iframe showing an example website
    Iframe with default height (16:9)
    Iframe showing an example website with a custom height
    Iframe with custom height
    {
      type: "Panel",
      body: [
        { type: "Paragraph", text: "Paragraph 1" },
        { type: "FlexibleSpace" },
        { type: "Paragraph", text: "Paragraph 2" },
      ],
    }
    {
      type: "Grid",
      grid: "auto-flow / auto 1fr auto",
      items: [
        { type: "Button", label: "Button 1", onClick: () => {} },
        { type: "FlexibleSpace" },
        { type: "Button", label: "Button 2", onClick: () => {} },
      ],
    }
    {
      type: "CheckboxGroup",
      label: "Select your hobbies",
      options: [
        { label: "👾 Video games", value: "gaming" },
        { label: "🎨 Art", value: "art" },
        { label: "🎤 Singing", value: "singing" },
        { label: "🎬 Movies", value: "movies" },
      ],
      value: ["gaming", "art"],
      onChange: ({ value, id }) => { }
    }
    { type: "Iframe", url: "https://www.example.com" }
    { type: "Iframe", url: "https://www.example.com", height: 300 }

    label: string

    The label of the feature action.


    onTrigger()

    onTrigger: (args: { feature: LayerFeature; }) => void

    The function to call when the feature action is triggered.

    Parameters

    Parameter
    Type
    Description

    args

    { feature: ; }

    The arguments passed to the function.

    args.feature

    The feature that triggered the action.

    Returns

    void


    id

    id: string


    layerIds?

    optional layerIds: string[]

    The layers to add the action to. Optional. Defaults to all layers.


    geometryTypes?

    optional geometryTypes: ("Polygon" | "Point" | "Line" | "Raster")[]

    The geometry type of the features to add the action to. Optional. Defaults to all geometry types.


    type?

    optional type: undefined


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    :
    string

    elements

    elements: { element: UIPanelElementCreate; container: "footer" | "body" | { id: string; }; placement: { after: string; } | { before: string; } | { at: "start" | "end"; }; }[]

    Name
    Type
    Description

    element

    -

    container?

    "footer" | "body" | { id: string; }

    The section of the panel to add the element to. It can be either one of the top-level sections of the panel ("body" or "footer") or a specific container (like ) in the panel ({ id: string }).

    placement?

    { after: string; } | { before: string; } | { at: "start" | "end"; }

    The placement of the element in the target container (based on the container property).

    UIFeatureActionCreate


    Represents a feature action for creation. It can be added to the map by using the UiController.createFeatureAction method.

    Properties

    label

    label: string

    The label of the feature action.


    onTrigger()

    onTrigger: (args: { feature: ; }) => void

    The function to call when the feature action is triggered.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    layerIds?

    optional layerIds: string[]

    The layers to add the action to. Optional. Defaults to all layers.


    geometryTypes?

    optional geometryTypes: ("Polygon" | "Point" | "Line" | "Raster")[]

    The geometry type of the features to add the action to. Optional. Defaults to all geometry types.


    type?

    optional type: undefined


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIGridContainerElementCreate


    The parameters for creating a grid container element.

    See UIGridContainerElement for more details.

    Properties

    type

    type: "Grid"


    items

    items: ( | | | | | | | | | | )[]

    The items to add to the grid container.


    grid?

    optional grid: string

    The grid to use for the container. It is the exact same as CSS's shorthand property grid.

    Example

    horizontal stack

    two columns, the first column is 50px wide, the second column takes the remaining space

    See

    for more details.


    verticalAlignment?

    optional verticalAlignment: "center" | "top" | "bottom"

    The alignment of the items in the grid. Only takes effect on horizontal stacks.

    Default Value

    "top"


    horizontalDistribution?

    optional horizontalDistribution: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly"

    The distribution of the items in the grid. Only takes effect on horizontal stacks.

    Default Value

    "start"


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined

    UIRadioGroupElementCreate


    The parameters for creating a radio group element.

    See UIRadioGroupElement for more details.

    Properties

    type

    type: "RadioGroup"


    options

    options: []

    The options to display in the radio group.


    onChange()

    onChange: (args: { value: undefined | string; id: string; }) => void

    The function to call when the value of the radio group changes.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    value?

    optional value: string = valueSchema

    The value of the radio group.

    Default Value

    undefined


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UpdateFeatureActionParams


    Properties

    id

    id: string


    label?

    optional label: string

    The label of the feature action.


    layerIds?

    optional layerIds: string[]

    The layers to add the action to. Optional. Defaults to all layers.


    geometryTypes?

    optional geometryTypes: ("Polygon" | "Point" | "Line" | "Raster")[]

    The geometry type of the features to add the action to. Optional. Defaults to all geometry types.


    type?

    optional type: undefined


    onTrigger()?

    optional onTrigger: (args: { feature: ; }) => void

    The function to call when the feature action is triggered.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIPanelCreateOrUpdate


    The parameters for creating a panel by using UiController.createOrUpdatePanel.

    See

    UIPanel for more information about panels.

    Properties

    id

    id: string

    The ID of the panel obtained from .

    Remarks

    Custom IDs are not supported.


    title?

    optional title: string

    The title to display in the panel header.


    onClickClose()?

    optional onClickClose: (args: { id: string; }) => void

    A function to call when panel's close button is clicked.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    type?

    optional type: "Panel"


    body?

    optional body: []

    The elements to add to the panel body.


    footer?

    optional footer: []

    The elements to add to the panel footer.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIToggleGroupElementCreate


    The parameters for creating a toggle group element.

    See UIToggleGroupElement for more details.

    Properties

    type

    type: "ToggleGroup"


    value

    value: string[] = valueSchema

    The value of the toggle group.

    Default Value

    []


    options

    options: []

    The options to display in the toggle group.


    onChange()

    onChange: (args: { value: string[]; id: string; }) => void

    The function to call when the value of the toggle group changes.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    alignment?

    optional alignment: "start" | "end"

    The alignment of the toggle group.

    Default Value

    "start"


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UITextElementCreate


    The parameters for creating a text element.

    See UITextElement for more details.

    Remarks

    id is optional but recommended if you want to be able to perform updates.

    Properties

    type

    type: "Text"


    content

    content: string

    The text to display in the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    id?

    optional id: string

    The ID of the element.

    Remarks

    If not provided, the element will be assigned a random ID, but it is recommended to provide it to perform further updates on the element.

    If provided, it must be unique within the UI.

    Default Value

    undefined

    UITextElement


    Represents a text element in a panel. Markdown is supported.

    Examples

    simple

    with links

    markdown

    complex markdown

    Complex markdown syntax is supported like tables, images, quotes, etc.

    Properties

    type

    type: "Text"


    content

    content: string

    The text to display in the element.


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    Returns

    void

    UIPanel


    A UI panel that can be added to the map using .

    Panels are containers for UI elements with title, body, footer, and close button. Body and footer elements are arranged in vertical stacks.

    Body

    Main content area that scrolls when content exceeds available space.

    UIGridContainerElementUpdate


    The parameters for updating a grid container element.

    See for more details.

    Remarks

    id and type are required to identify the element to update.

    UIButtonElementUpdate


    The parameters for updating a button element.

    See for more details.

    Remarks

    id and type are required to identify the element to update.

    UIRadioGroupElement


    The parameters for creating a radio group element.

    The radio group is a control that allows the user to select a single value from a list of options.

    As a control, the radio group can have a label displayed above the radioes.

    If no value is provided, value is undefined, the radio group will be empty.

    UIRadioGroupElementUpdate


    The parameters for updating a radio group element.

    See for more details.

    Properties

    UISelectElement


    Represents a select element in a panel.

    Remarks

    options property is required. label property is displayed above the select and used for screen readers. value property is optional, for empty value use undefined. placeholder

    UIDividerElementUpdate


    The parameters for updating a divider element.

    See for more details.

    Remarks

    id and type are required to identify the element to update.

    {
      type: "Text",
      content: "Hello, world!",
    }

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { feature: LayerFeature; }

    The arguments passed to the function.

    args.feature

    LayerFeature

    The feature that triggered the action.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    LayerFeature

    args

    { value: undefined | string; id: string; }

    The arguments passed to the function.

    args.value

    undefined | string

    The selected value.

    args.id

    string

    The id of the radio group element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIControlElementOption

    args

    { feature: LayerFeature; }

    The arguments passed to the function.

    args.feature

    LayerFeature

    The feature that triggered the action.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    LayerFeature

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the panel.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UiController.createPanelId
    UIPanelElementCreate
    UIPanelElementCreate

    args

    { value: string[]; id: string; }

    The arguments passed to the function.

    args.value

    string[]

    Array of the selected values.

    args.id

    string

    The id of the toggle group element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIControlElementOption
    LayerFeature
    LayerFeature
    UIPanelElementCreate
    UIGridContainerElement
    Properties

    type

    type: "Button"


    id

    id: string

    The ID of the element.


    label?

    optional label: string

    The label to display in the button.


    variant?

    optional variant: "filled" | "transparent" | "outlined"

    The style variant of the button.

    • "filled": a button with background.

      • background color is based on button's tint (defaults to default tint)

    • "transparent": a transparent button that gets a subtle dark background when hovered.

      • text color is based on button's tint (defaults to default tint)

    • "outlined": a transparent button with a border.

      • text and border colors are based on button's tint (defaults to default tint)

    Default Value

    "filled"


    tint?

    optional tint: "default" | "primary" | "accent" | "danger"

    The tint of the button.

    • "default": Felt's theme-based light/dark colors.

    • "primary": Felt's primary color (pink).

    • "accent": Felt's accent color (blue).

    • "danger": Felt's danger color (red).

    Default Value

    "default"


    disabled?

    optional disabled: boolean

    Whether the button is disabled.

    Default Value

    false


    onClick()?

    optional onClick: (args: { id: string; }) => void

    The action to perform when the button is clicked.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the button.

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    UIButtonElement
    type

    type: "RadioGroup"


    id

    id: string

    The ID of the element.


    value?

    optional value: string = valueSchema

    The value of the radio group.

    Default Value

    undefined


    options?

    optional options: UIControlElementOption[]

    The options to display in the radio group.


    onChange()?

    optional onChange: (args: { value: undefined | string; id: string; }) => void

    The function to call when the value of the radio group changes.

    Parameters

    Parameter
    Type
    Description

    args

    { value: undefined | string; id: string; }

    The arguments passed to the function.

    args.value

    undefined | string

    The selected value.

    args.id

    string

    The id of the radio group element.

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    UIRadioGroupElement
    Properties

    type

    type: "Divider"


    id

    id: string

    The ID of the element.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    UIDividerElement

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    UIButtonElementCreate
    UITextElementCreate
    UIDividerElementCreate
    UITextInputElementCreate
    UISelectElementCreate
    UIFlexibleSpaceElementCreate
    UIButtonRowElementCreate
    UICheckboxGroupElementCreate
    UIRadioGroupElementCreate
    UIToggleGroupElementCreate
    UIIframeElementCreate
    https://developer.mozilla.org/en-US/docs/Web/CSS/grid

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Properties

    type

    type: "RadioGroup"


    options

    options: UIControlElementOption[]

    The options to display in the radio group.


    onChange()

    onChange: (args: { value: undefined | string; id: string; }) => void

    The function to call when the value of the radio group changes.

    Parameters

    Parameter
    Type
    Description

    args

    { value: undefined | string; id: string; }

    The arguments passed to the function.

    args.value

    undefined | string

    The selected value.

    args.id

    string

    The id of the radio group element.

    Returns

    void


    id

    id: string

    The ID of the element.


    value?

    optional value: string = valueSchema

    The value of the radio group.

    Default Value

    undefined


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    label?

    optional label: string

    Label text to display above the element and used for screen readers.

    Radio group basic
    A radio buttons group with a label
    Footer

    Sticky bottom section for action buttons (e.g., Save, Cancel).

    Close Button

    Optional close icon in header. When onClickClose is provided, you must handle panel cleanup and removal.

    Example

    Properties

    type

    type: "Panel"


    id

    id: string

    The ID of the panel obtained from UiController.createPanelId.

    Remarks

    Custom IDs are not supported.


    title?

    optional title: string

    The title to display in the panel header.


    body?

    optional body: UIPanelElement[]

    The elements to add to the panel body.


    footer?

    optional footer: UIPanelElement[]

    The elements to add to the panel footer.


    onClickClose()?

    optional onClickClose: (args: { id: string; }) => void

    A function to call when panel's close button is clicked.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the panel.

    Returns

    void


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    UiController.createOrUpdatePanel
    Properties

    type

    type: "Grid"


    id

    id: string

    The ID of the element.


    grid?

    optional grid: string

    The grid to use for the container. It is the exact same as CSS's shorthand property grid.

    Example

    horizontal stack

    two columns, the first column is 50px wide, the second column takes the remaining space

    See

    https://developer.mozilla.org/en-US/docs/Web/CSS/grid for more details.


    verticalAlignment?

    optional verticalAlignment: "center" | "top" | "bottom"

    The alignment of the items in the grid. Only takes effect on horizontal stacks.

    Default Value

    "top"


    horizontalDistribution?

    optional horizontalDistribution: "center" | "start" | "end" | "space-between" | "space-around" | "space-evenly"

    The distribution of the items in the grid. Only takes effect on horizontal stacks.

    Default Value

    "start"


    items?

    optional items: (UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate)[]

    The items to add to the grid container.


    onCreate()?

    optional onCreate: (args: { id: string; }) => void

    A function to call when the element is created.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void


    onDestroy()?

    optional onDestroy: (args: { id: string; }) => void

    A function to call when the element is destroyed.

    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    Returns

    void

    UIGridContainerElement
    property is displayed in the select when no value is selected.
    search
    property is used to enable searching through the options.
    onChange
    property is used to handle the value change event.

    Examples

    empty select

    with label

    label is displayed above the select and used for screen readers. placeholder is displayed in the select when no value is selected.

    with search

    Properties

    type

    type: "Select"


    options

    options: UIControlElementOption[]

    The options to display in the select.


    o