Skip to content
This plugin is new and currently in beta. For the stable version, please use the previous version of the plugin.

UEAttr

Configuration object defining supported attributes for UI elements.

typescript
const UEAttr: {
  DEFAULT: UIElementAttributes;
  BUTTON: ButtonAttributes;
  CHECKBOX: CheckBoxAttributes;
  CHECK_BUTTONS: CheckButtonsAttributes;
  COLOR: UIElementAttributes;
  COUNTER: CounterAttributes;
  DATEPICKER: DatePickerAttributes;
  LABEL: LabelAttributes;
  MESSAGE: MessageAttributes;
  RADIO_BUTTONS: RadioButtonsAttributes;
  SELECTPICKER: SelectAttributes;
  FONT_FAMILY_SELECT: FontFamilySelectAttributes;
  SWITCHER: UIElementAttributes;
  TEXT: TextAttributes;
  TEXTAREA: TextAreaAttributes;
  ICON: IconAttributes;
  CHECK_ITEM: CheckItemAttributes;
  SELECT_ITEM: SelectItemAttributes;
  RADIO_ITEM: RadioItemAttributes;
  NESTED_CONTROL: NestedControlAttributes;
}

Description

UEAttr provides comprehensive attribute definitions for all UI elements in the Stripo Email Editor. Each UI element type has specific attributes that control its appearance, behavior, and data handling. These attributes can be set in templates or modified dynamically through the UIElement API.

Import

typescript
import { UEAttr } from '@stripoinc/ui-editor-extensions';

Common Attributes

DEFAULT

Base attributes shared by all UI elements.

typescript
DEFAULT: {
  name: 'name',
  disabled: 'disabled'
}
AttributeTypeDescription
namestringElement identifier
disabledbooleanDisable interaction

Input Element Attributes

BUTTON

Button element attributes.

typescript
BUTTON: {
  name: 'name',
  disabled: 'disabled',
  caption: 'caption',
  icon: 'icon'
}
AttributeTypeDescription
captionstringButton text
iconstringIcon identifier

CHECKBOX

Checkbox element attributes.

typescript
CHECKBOX: {
  name: 'name',
  disabled: 'disabled',
  caption: 'caption'
}
AttributeTypeDescription
captionstringCheckbox label

CHECK_BUTTONS

Check button group attributes.

typescript
CHECK_BUTTONS: {
  name: 'name',
  disabled: 'disabled',
  buttons: 'buttons'
}
AttributeTypeDescription
buttonsstringButton configuration

COUNTER

Numeric counter attributes.

typescript
COUNTER: {
  name: 'name',
  disabled: 'disabled',
  minValue: 'min-value',
  maxValue: 'max-value',
  step: 'step'
}
AttributeTypeDescription
minValuenumberMinimum value
maxValuenumberMaximum value
stepnumberIncrement step

DATEPICKER

Date picker attributes.

typescript
DATEPICKER: {
  name: 'name',
  disabled: 'disabled',
  placeholder: 'placeholder',
  minDate: 'min-date'
}
AttributeTypeDescription
placeholderstringPlaceholder text
minDatestringMinimum selectable date

Text Input Attributes

TEXT

Text input attributes.

typescript
TEXT: {
  name: 'name',
  disabled: 'disabled',
  placeholder: 'placeholder'
}
AttributeTypeDescription
placeholderstringPlaceholder text

TEXTAREA

Textarea attributes.

typescript
TEXTAREA: {
  name: 'name',
  disabled: 'disabled',
  placeholder: 'placeholder',
  resizable: 'resizable'
}
AttributeTypeDescription
placeholderstringPlaceholder text
resizablebooleanAllow resizing

Selection Attributes

SELECTPICKER

Select dropdown attributes.

typescript
SELECTPICKER: {
  name: 'name',
  disabled: 'disabled',
  searchable: 'searchable',
  multiSelect: 'multi-select',
  placeholder: 'placeholder',
  items: 'items'
}
AttributeTypeDescription
searchablebooleanEnable search
multiSelectbooleanAllow multiple selection
placeholderstringPlaceholder text
itemsstringOption items

FONT_FAMILY_SELECT

Font family selector attributes.

typescript
FONT_FAMILY_SELECT: {
  // All SELECTPICKER attributes plus:
  addCustomFontOption: 'add-custom-font-option'
}
AttributeTypeDescription
addCustomFontOptionbooleanShow "Add custom font" option

RADIO_BUTTONS

Radio button group attributes.

typescript
RADIO_BUTTONS: {
  name: 'name',
  disabled: 'disabled',
  buttons: 'buttons'
}
AttributeTypeDescription
buttonsstringRadio button configuration

Display Element Attributes

LABEL

Label element attributes.

typescript
LABEL: {
  name: 'name',
  disabled: 'disabled',
  text: 'text',
  hint: 'hint'
}
AttributeTypeDescription
textstringLabel text
hintstringTooltip text

MESSAGE

Message element attributes.

typescript
MESSAGE: {
  name: 'name',
  disabled: 'disabled',
  type: 'type'
}
AttributeTypeDescription
typestringMessage type (info/warning/error)

ICON

Icon element attributes.

typescript
ICON: {
  name: 'name',
  disabled: 'disabled',
  img: 'img',
  src: 'src',
  title: 'title',
  width: 'width',
  height: 'height',
  imageClass: 'image-class',
  hint: 'hint',
  isActive: 'is-active',
  visibility: 'visibility',
  transform: 'transform'
}
AttributeTypeDescription
imgstringImage element
srcstringImage source URL
titlestringIcon title
widthnumberIcon width
heightnumberIcon height
imageClassstringCSS class for image
hintstringTooltip text
isActivebooleanActive state
visibilitystringVisibility state
transformstringCSS transform

Component Item Attributes

CHECK_ITEM

Checkbox item attributes.

typescript
CHECK_ITEM: {
  name: 'name',
  disabled: 'disabled',
  text: 'text',
  hint: 'hint',
  icon: 'icon',
  value: 'value'
}
AttributeTypeDescription
textstringItem text
hintstringTooltip
iconstringItem icon
valuestringItem value

RADIO_ITEM

Radio item attributes.

typescript
RADIO_ITEM: {
  name: 'name',
  disabled: 'disabled',
  text: 'text',
  hint: 'hint',
  icon: 'icon',
  value: 'value'
}

SELECT_ITEM

Select option attributes.

typescript
SELECT_ITEM: {
  name: 'name',
  disabled: 'disabled',
  text: 'text',
  value: 'value'
}
AttributeTypeDescription
textstringDisplay text
valuestringOption value

NESTED_CONTROL

Nested control container attributes.

typescript
NESTED_CONTROL: {
  name: 'name',
  disabled: 'disabled',
  controlId: 'control-id'
}
AttributeTypeDescription
controlIdstringID of nested control