govukwc-character-count

June 29, 2020 ยท View on GitHub

Usage

import 'govukwc-webcomponents/components/govukwc-character-count/govukwc-character-count';

API

<govukwc-character-count>

Attributes

PropertyTypeDefaultDescription
maxwordsnumber""Maximum word count (if applicable)
valuestring""Field value
maxlengthnumber500Maximum field length
rowsnumber5Field rows
idstring""Field id
namestring""Field name
labelstring""Label text
hintstring""Hint text
errorstring""Error text
pageHeadingLabelbooleanfalseDetermines if the label should be treated as a page level h1
invalidbooleanfalseFlag to define if field is in an invalid (error) state

Events

NameDetailDescription
govukwc:change-Fires when on field 'change' event
govukwc:keyup-Fires when on field 'keyup' event