Skip to content

Function: percentField()

ts
function percentField(props: UiPercentFieldProps): Element;

Defined in: src/UI/blocks/percentField.tsx:45

Parameters

ParameterTypeDescription
propsUiPercentFieldPropsConfiguration object

Returns

Element

Deprecated

Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.

Percent input field component with percent icon prefix.

Examples

Basic usage with required props

percentField({
  name: 'rate',
  label: 'Interest Rate',
});

Usage with default value

percentField({
  name: 'tax',
  label: 'Tax Rate',
  defaultValue: '15',
  placeholder: 'Enter percent',
  required: true,
  disabled: false
});

Matterway Assistant SDK Documentation