Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FormMessageInputLengthCounterProps

Props that are used to automatically add a counter for the remaining letters available for the text field. The counter will always be created to the right of the optional message.

The counter is really a simple string of: ${length} / ${maxLength}.

If you need additional customization, it is recommended to create your own implementation such as:

<FormMessage>
{errorMessage}
<MyCounter {...props} />
</FormMessage>

Note: this should not be used alongside form-level messages.

remarks

@since 2.9.0 Renamed from FormMessageCounterProps to FormMessageInputLengthCounterProps since a FormMessageCounter component was added

Hierarchy

Index

Properties

counterClassName?: string

An optional className to apply to the counter wrapper element.

counterStyle?: CSSProperties

An optional style to apply to the counter wrapper element.

length: number

The current length of the value in the related text field.

maxLength: number

The max length allowed for the value in the related text field.

Generated using TypeDoc