arrow-left

All pages
gitbookPowered 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


hashtag
Properties

hashtag
actionTrigger

actionTrigger:


hashtag
placement?

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

CreatePanelElementsParams


hashtag
Properties

hashtag
panelId

panelId: string


hashtag
elements

elements: { element: ; container: "footer" | "body" | { id: string; }; placement: { after: string; } | { before: string

Name
Type
Description

CreateFeatureActionParams


hashtag
Properties

hashtag
action

action:


hashtag
placement?

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

CreateOrUpdatePanelParams


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

hashtag
Properties

hashtag
panel

panel:

The panel to add.


hashtag
placement?

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


hashtag
initialPlacement?

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

The placement of the panel on the right sidebar stack.

hashtag
Default Value

{ at: "end" }

UIActionTriggerCreate
UIFeatureActionCreate
UIPanelCreateOrUpdate
; } | {
at
:
"start"
|
"end"
; }; }[]

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).

UIPanelElementCreate
UIPanelElementCreate
UIGridContainerElement

DeletePanelElementsParams


hashtag
Properties

hashtag
panelId

panelId: string


hashtag
elements

elements: string[]

PlacementForUIElement


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

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

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

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.

hashtag
Controller

  • UiController

hashtag
Interfaces

hashtag
Type Aliases

  • CreateActionTriggerParams
    UpdateActionTriggerParams
    CreateFeatureActionParams
    PlacementForUIElement
    UIPanelElement
    UIPanelElementCreate
    UpdateFeatureActionParams
    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
    UIPanelElementUpdate

    UIPanelElement


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

    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.

    hashtag
    Properties

    hashtag
    featureSelectPanel?

    optional featureSelectPanel: boolean

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


    hashtag
    featureHoverPanel?

    optional featureHoverPanel: boolean

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


    hashtag
    elementSelectPanel?

    optional elementSelectPanel: boolean

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


    hashtag
    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.


    hashtag
    imageLightboxOpen?

    optional imageLightboxOpen: boolean

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

    UIPanelElementCreate


    UIPanelElementCreate: UIButtonElementCreate | UITextElementCreate | UIDividerElementCreate | UITextInputElementCreate | UISelectElementCreate | UIFlexibleSpaceElementCreate | UIButtonRowElementCreate | UICheckboxGroupElementCreate | UIRadioGroupElementCreate | UIToggleGroupElementCreate | UIIframeElementCreate | UIGridContainerElementCreate

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

    hashtag
    Remarks

    For the sake of convenience, id is optional but recommended if you want to be able to perform updates.

    UIDividerElementUpdate


    The parameters for updating a divider element.

    See UIDividerElement for more details.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "Divider"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    UpdatePanelElementsParams


    hashtag
    Properties

    hashtag
    panelId

    panelId: string

    The ID of the panel to update.


    hashtag
    elements

    elements: { element: ; }[]

    Dictionary of element IDs to the element to update.

    Name
    Type

    UIButtonRowElementCreate


    The parameters for creating a button row element.

    See for more details.

    hashtag
    Properties

    UIButtonElement


    Represents a button element in a panel.

    hashtag
    Example

    hashtag

    UIFlexibleSpaceElementUpdate


    The parameters for updating a flexible space element.

    See for more details.

    hashtag
    Remarks

    id and type

    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:

    UIPanelElementUpdate


    UIPanelElementUpdate: | | | | | | | | | | |

    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).

    hashtag

    UIFlexibleSpaceElementCreate


    The parameters for creating a flexible space element.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "FlexibleSpace"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

    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.

    element

    UIPanelElementUpdate

    UIPanelElementUpdate
    hashtag
    type

    type: "ButtonRow"


    hashtag
    items

    items: UIButtonElementCreate[]

    The items to add to the button row.


    hashtag
    align?

    optional align: "start" | "end"

    The alignment of the button row.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UIButtonRowElement
    are required to identify the element to update.

    hashtag
    Properties

    hashtag
    type

    type: "FlexibleSpace"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UIFlexibleSpaceElement
    Remarks

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

    UIButtonElementUpdate
    UITextElementUpdate
    UITextInputElementUpdate
    UISelectElementUpdate
    UIDividerElementUpdate
    UIButtonRowElementUpdate
    UICheckboxGroupElementUpdate
    UIRadioGroupElementUpdate
    UIToggleGroupElementUpdate
    UIGridContainerElementUpdate
    UIFlexibleSpaceElementUpdate
    UIIframeElementUpdate
    Properties

    hashtag
    type

    type: "Button"


    hashtag
    label

    label: string

    The label to display in the button.


    hashtag
    onClick()

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

    The action to perform when the button is clicked.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the button.

    hashtag
    Returns

    void


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    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)

    hashtag
    Default Value

    "filled"


    hashtag
    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).

    hashtag
    Default Value

    "default"


    hashtag
    disabled?

    optional disabled: boolean

    Whether the button is disabled.

    hashtag
    Default Value

    false


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    Button variants
    Button variants

    UIToggleGroupElement

  • UISelectElement

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

    hashtag
    Examples

    A disabled option

    hashtag
    Properties

    hashtag
    label

    label: string


    hashtag
    value

    value: string


    hashtag
    disabled?

    optional disabled: boolean

    UIRadioGroupElement
    UICheckboxGroupElement
    {
      type: "Button",
      label: "Click me",
      onClick: () => alert("Button clicked"),
    }
    { label: "Option A", value: "optionA" }
    { label: "Option A", value: "optionA", disabled: true }

    UIButtonElementCreate


    The parameters for creating a button element.

    See UIButtonElement for more details.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "Button"


    hashtag
    label

    label: string

    The label to display in the button.


    hashtag
    onClick()

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

    The action to perform when the button is clicked.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    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)

    hashtag
    Default Value

    "filled"


    hashtag
    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).

    hashtag
    Default Value

    "default"


    hashtag
    disabled?

    optional disabled: boolean

    Whether the button is disabled.

    hashtag
    Default Value

    false


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

    UiControlsOptions


    hashtag
    Properties

    hashtag
    showLegend?

    optional showLegend: boolean

    Whether or not the legend is shown.

    hashtag
    Default Value


    hashtag
    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.

    hashtag
    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.

    hashtag
    Default Value


    hashtag
    fullScreenButton?

    optional fullScreenButton: boolean

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

    hashtag
    Remarks

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

    hashtag
    Default Value


    hashtag
    geolocation?

    optional geolocation: boolean

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

    hashtag
    Remarks

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

    hashtag
    Default Value


    hashtag
    zoomControls?

    optional zoomControls: boolean

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

    hashtag
    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.

    hashtag
    Default Value


    hashtag
    scaleBar?

    optional scaleBar: boolean

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

    hashtag
    Default Value

    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.

    hashtag
    Example

    Divider element is useful to separate sections of a panel.

    hashtag
    Properties

    hashtag
    type

    type: "Divider"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    UITextElementUpdate


    The parameters for updating a text element.

    See UITextElement for more details.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "Text"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    content?

    optional content: string

    The text to display in the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    UIGridContainerElementCreate


    The parameters for creating a grid container element.

    See for more details.

    hashtag
    Properties

    UIFeatureAction


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

    hashtag
    Properties

    hashtag

    UICheckboxGroupElementUpdate


    The parameters for updating a checkbox group element.

    See for more details.

    hashtag
    Properties

    UIRadioGroupElementUpdate


    The parameters for updating a radio group element.

    See for more details.

    hashtag
    Properties

    UIFlexibleSpaceElement


    Represents a flexible space element in a container.

    When rendered...

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

    • inside

    UITextElementCreate


    The parameters for creating a text element.

    See for more details.

    hashtag
    Remarks

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

    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.

    UpdateActionTriggerParams


    hashtag
    Properties

    hashtag
    id

    UIActionTriggerCreate


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

    hashtag
    Properties

    hashtag

    UICheckboxGroupElementCreate


    The parameters for creating a checkbox group element.

    See for more details.

    hashtag
    Properties

    UpdateFeatureActionParams


    hashtag
    Properties

    hashtag
    id

    UIButtonRowElementUpdate


    The parameters for updating a button row element.

    See for more details.

    hashtag
    Properties

    UIIframeElementUpdate


    The parameters for updating an iframe element.

    See for more details.

    hashtag
    Remarks

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

    UIFeatureActionCreate


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

    hashtag
    Properties

    hashtag

    UIDividerElementCreate


    The parameters for creating a divider element.

    See for more details.

    hashtag
    Remarks

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

    {
      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", ... },
      ],
    }
    id: string

    hashtag
    label?

    optional label: string

    The label of the action trigger.


    hashtag
    disabled?

    optional disabled: boolean

    Whether the action trigger is disabled or not.


    hashtag
    type?

    optional type: undefined


    hashtag
    onTrigger()?

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

    The function to call when the action trigger is triggered.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the action trigger.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    "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)

  • "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.

    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.

    hashtag
    type

    type: "CheckboxGroup"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string[] = valueSchema

    The value of the checkbox group.

    hashtag
    Default Value

    []


    hashtag
    options?

    optional options: UIControlElementOption[]

    The options to display in the checkbox group.


    hashtag
    onChange()?

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

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

    hashtag
    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.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UICheckboxGroupElement
    hashtag
    type

    type: "RadioGroup"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string = valueSchema

    The value of the radio group.

    hashtag
    Default Value

    undefined


    hashtag
    options?

    optional options: UIControlElementOption[]

    The options to display in the radio group.


    hashtag
    onChange()?

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

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

    hashtag
    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.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIRadioGroupElement
    hashtag
    Properties

    hashtag
    type

    type: "Text"


    hashtag
    content

    content: string

    The text to display in the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

    UITextElement
    label

    label: string

    The label of the action trigger.


    hashtag
    onTrigger()

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

    The function to call when the action trigger is triggered.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the action trigger.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string


    hashtag
    disabled?

    optional disabled: boolean

    Whether the action trigger is disabled or not.


    hashtag
    type?

    optional type: undefined


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UiController.createActionTrigger
    hashtag
    type

    type: "CheckboxGroup"


    hashtag
    value

    value: string[] = valueSchema

    The value of the checkbox group.

    hashtag
    Default Value

    []


    hashtag
    options

    options: UIControlElementOption[]

    The options to display in the checkbox group.


    hashtag
    onChange()

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

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

    hashtag
    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.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UICheckboxGroupElement
    hashtag
    type

    type: "ButtonRow"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    align?

    optional align: "start" | "end"

    The alignment of the button row.

    hashtag
    Default Value

    "start"


    hashtag
    items?

    optional items: UIButtonElementCreate[]

    The items to add to the button row.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIButtonRowElement

    hashtag
    Properties

    hashtag
    type

    type: "Iframe"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    height?

    optional height: string | number

    The height of the iframe.

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


    hashtag
    url?

    optional url: string

    The URL of the iframe.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UIIframeElement
    hashtag
    Properties

    hashtag
    type

    type: "Divider"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

    UIDividerElement
    hashtag
    Properties

    hashtag
    type

    type: "Iframe"


    hashtag
    url

    url: string

    The URL of the iframe.


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    height?

    optional height: string | number

    The height of the iframe.

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


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    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
    hashtag
    type

    type: "Grid"


    hashtag
    items

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

    The items to add to the grid container.


    hashtag
    grid?

    optional grid: string

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

    hashtag
    Example

    hashtag
    horizontal stack

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

    hashtag
    See

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


    hashtag
    verticalAlignment?

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

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

    hashtag
    Default Value

    "top"


    hashtag
    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.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

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

    hashtag
    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.

    hashtag
    Properties

    hashtag
    type

    type: "FlexibleSpace"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UIGridContainerElement
    UIPanelElement
    true
    true
    true
    false
    true
    true
    { type: "Iframe", url: "https://www.example.com" }
    { type: "Iframe", url: "https://www.example.com", height: 300 }
    {
      type: "Grid",
      grid: "auto-flow / 50px 1fr",
      items: [...]
    }
    {
      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: () => {} },
      ],
    }
    label

    label: string

    The label of the feature action.


    hashtag
    onTrigger()

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

    The function to call when the feature action is triggered.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { feature: ; }

    The arguments passed to the function.

    args.feature

    The feature that triggered the action.

    hashtag
    Returns

    void


    hashtag
    id

    id: string


    hashtag
    layerIds?

    optional layerIds: string[]

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


    hashtag
    geometryTypes?

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

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


    hashtag
    type?

    optional type: undefined


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    id: string

    hashtag
    label?

    optional label: string

    The label of the feature action.


    hashtag
    layerIds?

    optional layerIds: string[]

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


    hashtag
    geometryTypes?

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

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


    hashtag
    type?

    optional type: undefined


    hashtag
    onTrigger()?

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

    The function to call when the feature action is triggered.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { feature: ; }

    The arguments passed to the function.

    args.feature

    The feature that triggered the action.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    label

    label: string

    The label of the feature action.


    hashtag
    onTrigger()

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

    The function to call when the feature action is triggered.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { feature: ; }

    The arguments passed to the function.

    args.feature

    The feature that triggered the action.

    hashtag
    Returns

    void


    hashtag
    layerIds?

    optional layerIds: string[]

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


    hashtag
    geometryTypes?

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

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


    hashtag
    type?

    optional type: undefined


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UiController.createFeatureAction

    UISelectElementUpdate


    The parameters for updating a select element.

    See UISelectElement for more details.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "Select"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string

    The value of the select.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the select.


    hashtag
    search?

    optional search: boolean

    Whether the select should allow searching through the options.

    hashtag
    Default Value

    false


    hashtag
    options?

    optional options: []

    The options to display in the select.


    hashtag
    onChange()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIPanelCreateOrUpdate


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

    hashtag
    See

    UIPanel for more information about panels.

    hashtag
    Properties

    hashtag
    id

    id: string

    The ID of the panel obtained from .

    hashtag
    Remarks

    Custom IDs are not supported.


    hashtag
    title?

    optional title: string

    The title to display in the panel header.


    hashtag
    onClickClose()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    type?

    optional type: "Panel"


    hashtag
    body?

    optional body: []

    The elements to add to the panel body.


    hashtag
    footer?

    optional footer: []

    The elements to add to the panel footer.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    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.

    A checkbox group with a label

    hashtag
    Properties

    hashtag
    type

    type: "CheckboxGroup"


    hashtag
    value

    value: string[] = valueSchema

    The value of the checkbox group.

    hashtag
    Default Value

    []


    hashtag
    options

    options: []

    The options to display in the checkbox group.


    hashtag
    onChange()

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UITextElement


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

    hashtag
    Examples

    hashtag
    simple

    hashtag
    with links

    hashtag
    markdown

    hashtag
    complex markdown

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

    hashtag
    Properties

    hashtag
    type

    type: "Text"


    hashtag
    content

    content: string

    The text to display in the element.


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    UIRadioGroupElementCreate


    The parameters for creating a radio group element.

    See UIRadioGroupElement for more details.

    hashtag
    Properties

    hashtag
    type

    type: "RadioGroup"


    hashtag
    options

    options: []

    The options to display in the radio group.


    hashtag
    onChange()

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    value?

    optional value: string = valueSchema

    The value of the radio group.

    hashtag
    Default Value

    undefined


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UIIframeElementCreate


    The parameters for creating an iframe element.

    See UIIframeElement for more details.

    hashtag
    Remarks

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

    hashtag
    Properties

    hashtag
    type

    type: "Iframe"


    hashtag
    url

    url: string

    The URL of the iframe.


    hashtag
    height?

    optional height: string | number

    The height of the iframe.

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


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined

    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.

    A radio buttons group with a label

    hashtag
    Properties

    hashtag
    type

    type: "RadioGroup"


    hashtag
    options

    options: []

    The options to display in the radio group.


    hashtag
    onChange()

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string = valueSchema

    The value of the radio group.

    hashtag
    Default Value

    undefined


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIToggleGroupElementUpdate


    The parameters for updating a toggle group element.

    See UIToggleGroupElement for more details.

    hashtag
    Properties

    hashtag
    type

    type: "ToggleGroup"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    alignment?

    optional alignment: "start" | "end"

    The alignment of the toggle group.

    hashtag
    Default Value

    "start"


    hashtag
    value?

    optional value: string[] = valueSchema

    The value of the toggle group.

    hashtag
    Default Value

    []


    hashtag
    options?

    optional options: []

    The options to display in the toggle group.


    hashtag
    onChange()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIButtonElementUpdate


    The parameters for updating a button element.

    See for more details.

    hashtag
    Remarks

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

    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.

    hashtag
    Body

    Main content area that scrolls when content exceeds available space.

    UISelectElementCreate


    The parameters for creating a select element.

    See for more details.

    hashtag
    Remarks

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

    UITextInputElementUpdate


    The parameters for updating a text input element.

    See for more details.

    hashtag
    Remarks

    id and type

    UIGridContainerElementUpdate


    The parameters for updating a grid container element.

    See for more details.

    hashtag
    Remarks

    id and type

    {
      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: "RadioGroup",
      label: "Select a side",
      options: [
        { label: "🍟", value: "fries" },
        { label: "🍚", value: "rice" },
        { label: "🥗", value: "salad" },
      ],
      value: "rice",
      onChange: ({ value, id }) => { }
    }

    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

    { 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.

    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

    { 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: 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

    { 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
    LayerFeature
    LayerFeature
    LayerFeature
    LayerFeature

    hashtag
    Properties

    hashtag
    type

    type: "Button"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    label?

    optional label: string

    The label to display in the button.


    hashtag
    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)

    hashtag
    Default Value

    "filled"


    hashtag
    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).

    hashtag
    Default Value

    "default"


    hashtag
    disabled?

    optional disabled: boolean

    Whether the button is disabled.

    hashtag
    Default Value

    false


    hashtag
    onClick()?

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

    The action to perform when the button is clicked.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the button.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UIButtonElement
    hashtag
    Properties

    hashtag
    type

    type: "Select"


    hashtag
    options

    options: UIControlElementOption[]

    The options to display in the select.


    hashtag
    onChange()

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

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

    hashtag
    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.

    hashtag
    Returns

    void


    hashtag
    value?

    optional value: string

    The value of the select.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the select.


    hashtag
    search?

    optional search: boolean

    Whether the select should allow searching through the options.

    hashtag
    Default Value

    false


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UISelectElement
    are required to identify the element to update.

    hashtag
    Properties

    hashtag
    type

    type: "TextInput"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string

    The value of the input. Use "" for empty values.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the input.


    hashtag
    onChange()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onBlur()?

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

    The function to call when the input is blurred.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onFocus()?

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

    The function to call when the input is focused.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UITextInputElement

    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
    Checkbox group basic

    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
    Radio group basic

    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.

    hashtag
    Footer

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

    hashtag
    Close Button

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

    hashtag
    Example

    hashtag
    Properties

    hashtag
    type

    type: "Panel"


    hashtag
    id

    id: string

    The ID of the panel obtained from UiController.createPanelId.

    hashtag
    Remarks

    Custom IDs are not supported.


    hashtag
    title?

    optional title: string

    The title to display in the panel header.


    hashtag
    body?

    optional body: UIPanelElement[]

    The elements to add to the panel body.


    hashtag
    footer?

    optional footer: UIPanelElement[]

    The elements to add to the panel footer.


    hashtag
    onClickClose()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the panel.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UiController.createOrUpdatePanel
    are required to identify the element to update.

    hashtag
    Properties

    hashtag
    type

    type: "Grid"


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    grid?

    optional grid: string

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

    hashtag
    Example

    hashtag
    horizontal stack

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

    hashtag
    See

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


    hashtag
    verticalAlignment?

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

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

    hashtag
    Default Value

    "top"


    hashtag
    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.

    hashtag
    Default Value

    "start"


    hashtag
    items?

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

    The items to add to the grid container.


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void

    UIGridContainerElement
    {
      type: "Text",
      content: "Hello, world!",
    }
    {
      type: "Text",
      content: "Fill the form https://www.google.com.",
    }
    {
      type: "Text",
      content: "**Hello**, _world_!",
    }
    {
      type: "Text",
      content: `
    
    # Heading
    
    This is a paragraph.
    
    ## Subheading
    
    This is a paragraph.
    
    | Name | Age |
    | ---- | --- |
    | John | 25 |
    | Jane | 30 |
    
    ![Image](https://via.placeholder.com/150)
    
    > This is a quote.
    
    [Link](https://www.google.com)
    `,
    }
    // 1. Create panel ID
    const panelId = await felt.createPanelId();
    
    // 2. Create panel with close button and footer
    await felt.createOrUpdatePanel({
      panel: {
        id: panelId,
        title: "My Panel",
        body: [
          { type: "Text", content: "Hello, world!" },
          { type: "TextInput", label: "Name", placeholder: "Enter your name" }
        ],
        footer: [
          {
            type: "ButtonRow",
            align: "end",
            items: [
              { type: "Button", label: "Cancel", onClick: () => handleCancel() },
              { type: "Button", label: "Save", onClick: () => handleSave() }
            ]
          }
        ],
        onClickClose: (args) => {
          // Clean up any state or resources
          cleanupResources();
          // Close the panel
          felt.deletePanel(panelId);
        }
      }
    });
    {
      type: "Grid",
      grid: "auto-flow / 50px 1fr",
      items: [...]
    }

    UITextInputElement


    Represents a text input element in a panel.

    hashtag
    Remarks

    value property is required, for empty value use "". label property is displayed above the input and used for screen readers.

    hashtag
    Examples

    hashtag
    empty input

    hashtag
    with label

    hashtag
    Properties

    hashtag
    type

    type: "TextInput"


    hashtag
    value

    value: string

    The value of the input. Use "" for empty values.


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the input.


    hashtag
    onChange()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onBlur()?

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

    The function to call when the input is blurred.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onFocus()?

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

    The function to call when the input is focused.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIToggleGroupElement


    The parameters for creating a toggle group element.

    hashtag
    Options

    The options to display in the toggle group are defined using the options property. It can contain one or more options and each option renders a toggle.

    A group with a single option

    hashtag
    Alignment

    By default, the toggles are aligned to the start of the group, but it can be changed to end by setting the alignment property to end.

    hashtag
    Label

    As a control, the toggle group can have a label displayed above the toggles.

    hashtag
    Properties

    hashtag
    type

    type: "ToggleGroup"


    hashtag
    value

    value: string[] = valueSchema

    The value of the toggle group.

    hashtag
    Default Value

    []


    hashtag
    options

    options: []

    The options to display in the toggle group.


    hashtag
    onChange()

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    alignment?

    optional alignment: "start" | "end"

    The alignment of the toggle group.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIButtonRowElement


    Represents a row of buttons.

    It is useful to group buttons together and align them.

    Unlike on UIGridContainerElement, buttons do not expand to fill the container. Instead, they use the space they need and are wrapped to the next line when they overflow.

    hashtag
    Label

    A label can be added to the button row using the label property.

    hashtag
    Alignment

    It is possible to align the button row to the start or end of the container using the align property.

    hashtag
    Start alignment

    hashtag
    End alignment

    hashtag
    Overflow

    When buttons overflow the container, they are wrapped to the next line.

    hashtag
    With Grid container

    , as a generic container, can render as well.

    In this example, the combination of and is used to layout a footer where the buttons are aligned to the end of the container and the text is at the start.

    hashtag
    Properties

    hashtag
    type

    type: "ButtonRow"


    hashtag
    items

    items: []

    The items to add to the button row.


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    align?

    optional align: "start" | "end"

    The alignment of the button row.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    UIToggleGroupElementCreate


    The parameters for creating a toggle group element.

    See UIToggleGroupElement for more details.

    hashtag
    Properties

    hashtag
    type

    type: "ToggleGroup"


    hashtag
    value

    value: string[] = valueSchema

    The value of the toggle group.

    hashtag
    Default Value

    []


    hashtag
    options

    options: []

    The options to display in the toggle group.


    hashtag
    onChange()

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    alignment?

    optional alignment: "start" | "end"

    The alignment of the toggle group.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UISelectElement


    Represents a select element in a panel.

    hashtag
    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

    UITextInputElementCreate


    The parameters for creating a text input element.

    See for more details.

    hashtag
    Remarks

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

    {
      type: "ToggleGroup",
      options: [{ label: "Option A", value: "optionA" }],
      value: [],
      onChange: ({ value, id }) => { }
    }

    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
    hashtag
    Properties

    hashtag
    type

    type: "TextInput"


    hashtag
    value

    value: string

    The value of the input. Use "" for empty values.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the input.


    hashtag
    onChange()?

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

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

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onBlur()?

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

    The function to call when the input is blurred.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onFocus()?

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

    The function to call when the input is focused.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    hashtag
    Returns

    void


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    id?

    optional id: string

    The ID of the element.

    hashtag
    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.

    hashtag
    Default Value

    undefined


    hashtag
    label?

    optional label: string

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

    UITextInputElement

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input element.

    args

    { value: string; id: string; }

    The arguments passed to the function.

    args.value

    string

    The value of the input.

    args.id

    string

    The id of the input 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

    { 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
    Toggle group end alignment
    The toggles are aligned to the end
    Toggle group with label
    Toggle group basic

    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.

    UIGridContainerElement
    UIButtonRowElement
    UIGridContainerElement
    UIButtonRowElement
    UIButtonElement
    Label
    Label
    Start alignment
    Start alignment
    End alignment
    End alignment
    Overflow
    Overflow
    With Grid container
    With Grid container
    undefined
    .
    placeholder
    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.

    hashtag
    Examples

    hashtag
    empty select

    hashtag
    with label

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

    hashtag
    with search

    hashtag
    Properties

    hashtag
    type

    type: "Select"


    hashtag
    options

    options: UIControlElementOption[]

    The options to display in the select.


    hashtag
    onChange()

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

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

    hashtag
    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.

    hashtag
    Returns

    void


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    value?

    optional value: string

    The value of the select.


    hashtag
    placeholder?

    optional placeholder: string

    The placeholder text to display in the select.


    hashtag
    search?

    optional search: boolean

    Whether the select should allow searching through the options.

    hashtag
    Default Value

    false


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    args

    { id: string; }

    The arguments passed to the function.

    args.id

    string

    The id of the element.

    hashtag
    Returns

    void


    hashtag
    label?

    optional label: string

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

    {
      type: "TextInput",
      value: "",
      onChange: (args) => console.log(args.value),
      placeholder: "Enter your name",
    }
    {
      type: "TextInput",
      label: "Name",
      value: "Hello",
      onChange: (args) => console.log(args.value),
      placeholder: "Enter your name",
    }
    {
      type: "ToggleGroup",
      alignment: "end",
      label: "All options",
      options: [
        { label: "Option A", value: "optionA" },
        { label: "Option B", value: "optionB" },
      ],
      value: ["optionA"],
      onChange: ({ value, id }) => { }
    }
    {
      type: "ToggleGroup",
      label: "All options",
      options: [
        { label: "Option A", value: "optionA" },
        { label: "Option B", value: "optionB" },
      ],
      value: ["optionA"],
      onChange: ({ value, id }) => { }
    }
    {
      type: "ButtonRow",
      label: "Zoom control",
      items: [
        { type: "Button", label: "Increase", onClick: () => {} },
        { type: "Button", label: "Decrease", onClick: () => {} },
      ],
    }
    {
      type: "ButtonRow",
      align: "start", // default value
      items: [
        { type: "Button", label: "Button 1", onClick: () => {} },
        { type: "Button", label: "Button 2", onClick: () => {} },
      ],
    }
    {
      type: "ButtonRow",
      align: "end",
      items: [
        { type: "Button", label: "Button 1", onClick: () => {} },
        { type: "Button", label: "Button 2", onClick: () => {} },
      ],
    }
    {
      type: "ButtonRow",
      items: [
        { type: "Button", label: "Button with a very long text", onClick: () => {} },
        { type: "Button", label: "Button 2", onClick: () => {} },
        { type: "Button", label: "Button 3", onClick: () => {} },
      ],
    }
    {
      type: "Grid",
      grid: "auto-flow / 1fr auto",
      rowItemsJustify: "space-between",
      rowItemsAlign: "center",
      items: [
        { type: "Text", content: "Continue?" },
        {
          type: "ButtonRow",
          align: "end",
          items: [
            { type: "Button", variant: "transparent", label: "Cancel", onClick: () => {} },
            { type: "Button", variant: "filled", tint: "primary", label: "Continue", onClick: () => {} },
          ]
        },
      ],
    }
    {
      type: "Select",
      options: [{ label: "Option 1", value: "option1" }, { label: "Option 2", value: "option2" }],
      value: undefined,
      placeholder: "Select an option",
      onChange: (args) => console.log(args.value),
    }
    {
      type: "Select",
      label: "Fruit",
      options: [{ label: "Apple", value: "apple" }, { label: "Banana", value: "banana" }],
      value: undefined,
      placeholder: "Select a fruit",
      onChange: (args) => console.log(args.value),
    }
    {
      type: "Select",
      options: [{ label: "Option 1", value: "option1" }, { label: "Option 2", value: "option2" }],
      value: "option1",
      placeholder: "Select an option",
      search: true,
      onChange: (args) => console.log(args.value),
    }

    UIGridContainerElement


    Represents a container with a grid layout in a panel.

    By default, the grid items are vertically stacked, but you can change the grid to use a different layout by setting the grid property to a different value.

    grid property is the exact same as CSS's shorthand property grid. See the MDN documentation for more detailsarrow-up-right.

    You can understand UIPanel body and footer properties as grid containers using default vertical stack layout.

    hashtag
    Horizontal stack

    As part of CSS Grid Layout capabilities it is possible to create a horizontal stack.

    hashtag
    Alignment & Distribution

    On horizontal stacks, it is possible to align and distribute the items.

    verticalAlignment is used to align the items vertically. By default, items are aligned to the top of the container. It follows the same values as CSS's align-items property. See for more details.

    horizontalDistribution is used to justify the items horizontally. By default, items are justified to the start of the container. It follows the same values as CSS's justify-content property. See for more details.

    hashtag
    Equal width columns

    hashtag
    FlexibleSpace element

    FlexibleSpace element is a handy solution to allow more control over grid layout.

    If grid is not set, FlexibleSpace will add some space between the items. By using grid property it is possible to control FlexibleSpace's size.

    hashtag
    to right align the input

    hashtag
    two columns of buttons with space between them

    hashtag
    Properties

    hashtag
    type

    type: "Grid"


    hashtag
    items

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

    The items to add to the grid container.


    hashtag
    id

    id: string

    The ID of the element.


    hashtag
    grid?

    optional grid: string

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

    hashtag
    Example

    hashtag
    horizontal stack

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

    hashtag
    See

    for more details.


    hashtag
    verticalAlignment?

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

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

    hashtag
    Default Value

    "top"


    hashtag
    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.

    hashtag
    Default Value

    "start"


    hashtag
    onCreate()?

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

    A function to call when the element is created.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void


    hashtag
    onDestroy()?

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

    A function to call when the element is destroyed.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    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.

    MDN documentationarrow-up-right
    MDN documentationarrow-up-right
    UIButtonElement
    UITextElement
    UIDividerElement
    UITextInputElement
    UISelectElement
    UIFlexibleSpaceElement
    UIButtonRowElement
    UICheckboxGroupElement
    UIRadioGroupElement
    UIToggleGroupElement
    UIIframeElement
    https://developer.mozilla.org/en-US/docs/Web/CSS/gridarrow-up-right
    Two columns, each sharing 50% of the container width
    Flexible space takes 50% of the container width
    Two groups of buttons
    {
      type: "Grid",
      grid: "auto-flow / 1fr 1fr",
      items: [
        { type: "TextInput", label: "Name", value: "" },
        { type: "TextInput", label: "Last name", value: "" },
      ],
    }
    {
      type: "Grid",
      grid: "auto-flow / 1fr 1fr",
      items: [
        { type: "FlexibleSpace" },
        { type: "TextInput", label: "An input" , value: "" },
      ],
    }
    {
      type: "Grid",
      grid: "auto-flow / auto auto 1fr auto auto",
      items: [
        { type: "Button", label: "A" , onClick: () => {} },
        { type: "Button", label: "B" , onClick: () => {} },
        { type: "FlexibleSpace" },
        { type: "Button", label: "C" , onClick: () => {} },
        { type: "Button", label: "D" , onClick: () => {} },
      ],
    }
    {
      type: "Grid",
      grid: "auto-flow / 50px 1fr",
      items: [...]
    }
    Horizontal stack
    Flexible space to right align the input
    Two groups of buttons

    UiController


    The UI controller allows you to control various aspects of the Felt UI in your map.

    This includes enabling/disabling UI controls, managing on-map interactions, and controlling the visibility of UI components like the data table.

    hashtag
    Extended by

    hashtag
    Methods

    hashtag
    createActionTrigger()

    createActionTrigger(args: ): Promise<>

    Creates an action trigger. Action triggers are rendered on map's left sidebar as a button, similar to other map extensions like measure and spatial filter.

    The goal of action triggers is to allow users to perform actions on the map by clicking on a button.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Example


    hashtag
    updateActionTrigger()

    updateActionTrigger(args: ): Promise<>

    Updates an action trigger.

    Action trigger to update is identified by the id property.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Remarks

    Properties provided will override the existing properties.

    hashtag
    Example


    hashtag
    deleteActionTrigger()

    deleteActionTrigger(id: string): void

    Deletes an action trigger.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    createFeatureAction()

    createFeatureAction(args: ): Promise<>

    Creates a feature contextual action.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Example


    hashtag
    updateFeatureAction()

    updateFeatureAction(args: ): Promise<>

    Updates a feature contextual action.

    Feature contextual action to update is identified by the id property.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Remarks

    Properties provided will override the existing properties.

    hashtag
    Example


    hashtag
    deleteFeatureAction()

    deleteFeatureAction(id: string): void

    Deletes a feature contextual action.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    createPanelId()

    createPanelId(): Promise<string>

    Creates a panel ID.

    In order to create a panel using , you need to create a panel ID first. Panel IDs are automatically generated to prevent conflicts with other panels.

    hashtag
    Returns

    Promise<string>

    hashtag
    Example


    hashtag
    createOrUpdatePanel()

    createOrUpdatePanel(args: ): Promise<>

    Creates or updates a panel.

    Panels are rendered on the map's right sidebar and allow you to extend Felt UI for your own use cases using Felt UI elements (e.g., Text, Button, etc.).

    A panel is identified by its ID, which must be created using . Custom IDs are not supported to prevent conflicts with other panels.

    Panels have two main sections:

    • body - The main content area of the panel, which is scrollable.

    • footer - A section that sticks to the bottom of the panel, useful for action buttons like "Submit" or "Cancel".

    Panel placement is controlled by the initialPlacement parameter. By default, panels are added to the end of the panel stack, but you can specify a different placement. Note that this placement cannot be changed after the panel is created.

    Element IDs are required for targeted updates and deletions using the other panel management methods. For complete panel refreshes with this method, element IDs are optional but recommended for consistency.

    For dynamic content management, consider these approaches:

    • Use this method for complete panel refreshes (replaces all content)

    • Use to add new elements to existing panels

    • Use to modify specific existing elements

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Example


    hashtag
    deletePanel()

    deletePanel(id: string): void

    Deletes a panel.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    createPanelElements()

    createPanelElements(args: ): Promise<>

    Creates elements in a panel.

    Use this method to add new elements to an existing panel without replacing the entire panel content. This is useful for dynamic UI updates.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Example


    hashtag
    updatePanelElements()

    updatePanelElements(args: ): Promise<>

    Updates an existing element in a panel. This method can only update elements that already exist in the panel and have an ID.

    Use this method to modify specific elements without replacing the entire panel. This is more efficient than using for small changes.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<>

    hashtag
    Example


    hashtag
    deletePanelElements()

    deletePanelElements(args: ): void

    Deletes elements from a panel.

    Use this method to remove specific elements from a panel without replacing the entire panel content.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    updateUiControls()

    updateUiControls(controls: ): void

    Updates the UI controls on the embedded map.

    Use this method to show or hide various UI controls like the legend, full screen button, and other map interface elements.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    setOnMapInteractionsUi()

    setOnMapInteractionsUi(options: ): void

    Control the on-map UI shown when interacting with features and elements.

    If you add your own click, selection or hover handlers you may want to disable various parts of the Felt UI. This method allows you to control the visibility of various parts of the UI that might otherwise be shown when people click or hover on things.

    This does not affect selection. That means that selectable features and elements will still be selected when clicked.

    hashtag
    Parameters

    Parameter
    Type

    hashtag
    Returns

    void

    hashtag
    Example


    hashtag
    showLayerDataTable()

    showLayerDataTable(params?: { layerId: string; sorting: ; }): Promise<void>

    Shows a data table view for the specified layer, optionally sorted by a given attribute.

    The data table displays feature data in a tabular format, making it easy to browse and analyze layer data. You can control the initial sorting of the table.

    hashtag
    Parameters

    Parameter
    Type
    Description

    hashtag
    Returns

    Promise<void>

    hashtag
    Example


    hashtag
    hideLayerDataTable()

    hideLayerDataTable(): Promise<void>

    Hides the data table.

    hashtag
    Returns

    Promise<void>

    hashtag
    Example

    Use to remove specific elements

    args

    The arguments for the method.

    args

    The action trigger to update.

    id

    string

    The id of the action trigger to delete.

    args

    The arguments for the method.

    args

    The feature contextual action to update.

    id

    string

    The id of the feature contextual action to delete.

    args

    The arguments for creating or updating the panel.

    id

    string

    The id of the panel to delete.

    args

    The arguments for the method.

    args

    The arguments for the method.

    args

    The arguments for the method.

    controls

    The controls to update.

    options

    params?

    { layerId: string; sorting: ; }

    Optional parameters for showing the data table.

    params.layerId?

    string

    The ID of the layer to show data for.

    params.sorting?

    Optional sorting configuration for the table.

    FeltController
    CreateActionTriggerParams
    UIActionTriggerCreate
    UIActionTriggerCreate
    UpdateActionTriggerParams
    UIActionTriggerCreate
    UIActionTriggerCreate
    CreateFeatureActionParams
    UIFeatureAction
    UIFeatureAction
    UpdateFeatureActionParams
    UIFeatureAction
    UIFeatureAction
    createOrUpdatePanel
    CreateOrUpdatePanelParams
    UIPanel
    createPanelId
    createPanelElements
    updatePanelElements
    UIPanel
    CreatePanelElementsParams
    UIPanel
    UIPanel
    UpdatePanelElementsParams
    UIPanel
    createOrUpdatePanel
    UIPanel
    DeletePanelElementsParams
    UiControlsOptions
    OnMapInteractionsOptions
    SortConfig
    await felt.createActionTrigger({
      actionTrigger: {
        id: "enablePolygonTool", // optional. Required if you want to update the action trigger later
        label: "Draw polygon",
        onTrigger: async () => {
          felt.setTool("polygon");
        },
        disabled: false, // optional, defaults to false
      },
      placement: { at: "start" }, // optional, defaults to { at: "end" }
    });
    await felt.updateActionTrigger({
      id: "enablePolygonTool",
      label: "Enable polygon tool", // only label changes
    });
    await felt.deleteActionTrigger("enablePolygonTool");
    const myAction = await felt.createFeatureAction({
      action: {
        label: "Add to selection",
        onTrigger: async ({ feature }) => {
          console.log(`Adding feature ${feature.id} from layer ${feature.layerId} to selection`);
        },
        layerIds: ["layer-1", "layer-2"], // Display the feature action only on these layers
      },
      placement: { at: "start" }, // optional, defaults to { at: "end" }
    });
    
    const myAction = await felt.createFeatureAction({ ... });
    await felt.updateFeatureAction({
      id: myAction.id,
      label: "Updated action label", // only label changes
    });
    const myAction = await felt.createFeatureAction({ ... });
    await felt.deleteFeatureAction(myAction.id);
    const panelId = await felt.createPanelId();
    // 1. Create panel ID first (required)
    const panelId = await felt.createPanelId();
    
    // 2. Define reusable elements
    const SELECT = { id: "layer-select", type: "Select", label: "Layer", options: [...] };
    const ANALYZE_BTN = { id: "analyze-btn", type: "Button", label: "Analyze", onClick: handleAnalyze };
    const STATUS_TEXT = { id: "status-text", type: "Text", content: "" };
    const CLEAR_BTN = { id: "clear-btn", type: "Button", label: "Clear", onClick: handleClear };
    
    // 3. Initial state
    await felt.createOrUpdatePanel({
      panel: { id: panelId, title: "Data Analyzer", body: [SELECT, ANALYZE_BTN] }
    });
    
    // 4. Loading state (replaces entire panel)
    await felt.createOrUpdatePanel({
      panel: {
        id: panelId,
        title: "Data Analyzer",
        body: [SELECT, ANALYZE_BTN, { ...STATUS_TEXT, content: "Loading..." }]
      }
    });
    
    // 5. Results state (replaces entire panel)
    await felt.createOrUpdatePanel({
      panel: {
        id: panelId,
        title: "Data Analyzer",
        body: [SELECT, ANALYZE_BTN, { ...STATUS_TEXT, content: "**Results:**\n- Found 150 features" }, CLEAR_BTN]
      }
    });
    await felt.deletePanel("panel-1");
    await felt.createPanelElements({
      panelId,
      elements: [
        {
          element: { type: "Text", content: "Hello, world!" },
          container: "body",
          placement: { at: "start" },
        },
      ],
    });
    // 1. Create panel with initial elements
    const panelId = await felt.createPanelId();
    const STATUS_TEXT = { id: "status-text", type: "Text", content: "Ready" };
    
    await felt.createOrUpdatePanel({
      panel: {
        id: panelId,
        title: "My Panel",
        body: [STATUS_TEXT]
      }
    });
    
    // 2. Update the existing element
    await felt.updatePanelElements({
      panelId,
      elements: [
        {
          element: {
            ...STATUS_TEXT,                    // Reuse the same element structure
            content: "Updated content"         // Only change what needs updating
          },
        },
      ],
    });
    await felt.deletePanelElements({
      panelId,
      elements: ["element-1", "element-2"],
    });
    // Show some UI controls
    await felt.updateUiControls({
      showLegend: true,
      fullScreenButton: true,
    });
    
    // Disable some UI options
    await felt.updateUiControls({
      cooperativeGestures: false,
      geolocation: false,
    });
    // Disable UI when hovering or selecting features
    await felt.setOnMapInteractionsUi({
      featureSelectPanel: false,
      featureHoverPanel: false,
    });
    // Show data table with default sorting
    await felt.showLayerDataTable({
      layerId: "layer-1",
    });
    
    // Show data table sorted by height in descending order
    await felt.showLayerDataTable({
      layerId: "layer-1",
      sorting: {
        attribute: "height",
        direction: "desc",
      },
    });
    
    // Show the data table pane with no table visible
    await felt.showLayerDataTable();
    await felt.hideLayerDataTable();
    deletePanelElements
    CreateActionTriggerParams
    UpdateActionTriggerParams
    CreateFeatureActionParams
    UpdateFeatureActionParams
    CreateOrUpdatePanelParams
    CreatePanelElementsParams
    UpdatePanelElementsParams
    DeletePanelElementsParams
    UiControlsOptions
    OnMapInteractionsOptions
    SortConfig
    SortConfig