Skip to content

UI

UISDK

UISDK = object

Utilities to create UI components.

Properties

button()

button: (options?: object) => HTMLElement

Create a button.

Parameters
ParameterTypeDescription
options?{ label?: string; leadingIcon?: Icon; size?: "small" | "medium" | "large"; trailingIcon?: Icon; variant?: "primary" | "secondary" | "tertiary"; }Options for the button.
options.label?stringThe label of the button.
options.leadingIcon?IconThe leading icon of the button.
options.size?"small" | "medium" | "large"The size of the button.
options.trailingIcon?IconThe trailing icon of the button.
options.variant?"primary" | "secondary" | "tertiary"The variant of the button.
Returns

HTMLElement

The button element.

Example
ts
const deleteButton = sdk.ui.button({
  variant: "primary",
  label: "Delete",
  trailingIcon: "fas fa-trash-can",
  size: "small",
});
card()

card: (options?: object) => HTMLElement

Create a card.

Parameters
ParameterTypeDescription
options?{ body?: HTMLElement; footer?: HTMLElement; header?: HTMLElement; }Options for the card.
options.body?HTMLElementThe body of the card.
options.footer?HTMLElementThe footer of the card.
options.header?HTMLElementThe header of the card.
Returns

HTMLElement

The card element.

httpRequestEditor()

httpRequestEditor: () => HTTPRequestEditor

Create an HTTP request editor

Returns

HTTPRequestEditor

The HTTP request editor.

httpResponseEditor()

httpResponseEditor: () => HTTPResponseEditor

Create an HTTP response editor

Returns

HTTPResponseEditor

The HTTP response editor.

well()

well: (options?: object) => HTMLElement

Create a well.

Parameters
ParameterTypeDescription
options?{ body?: HTMLElement; footer?: HTMLElement; header?: HTMLElement; }Options for the well.
options.body?HTMLElementThe body of the well.
options.footer?HTMLElementThe footer of the well.
options.header?HTMLElementThe header of the well.
Returns

HTMLElement

The well element.