UNPKG

navody-digital-frontend

Version:

Navody.Digital Frontend contains the code you need to start building a user interface for navody.digital

117 lines 4.24 kB
[ { "name": "id", "type": "string", "required": true, "description": "This is used for the main component and to compose id attribute for each item." }, { "name": "namePrefix", "type": "string", "required": false, "description": "Optional prefix. This is used to prefix each `item.name` using `-`." }, { "name": "items", "type": "array", "required": false, "description": "An array of input objects with name, value and classes.", "params": [ { "name": "id", "type": "string", "required": false, "description": "Item-specific id. If provided, it will be used instead of the generated id." }, { "name": "name", "type": "string", "required": true, "description": "Item-specific name attribute." }, { "name": "label", "type": "string", "required": false, "description": "Item-specific label text. If provided, this will be used instead of `name` for item label text." }, { "name": "value", "type": "string", "required": false, "description": "If provided, it will be used as the initial value of the input." }, { "name": "autocomplete", "type": "string", "required": false, "description": "Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance \"bday-day\". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used." }, { "name": "pattern", "type": "string", "required": false, "description": "Attribute to [provide a regular expression pattern](https://www.w3.org/TR/html51/sec-forms.html#the-pattern-attribute), used to match allowed character combinations for the input value." }, { "name": "classes", "type": "string", "required": false, "description": "Classes to add to date input item." }, { "name": "attributes", "type": "object", "required": false, "description": "HTML attributes (for example data attributes) to add to the date input tag." } ] }, { "name": "hint", "type": "object", "required": false, "description": "Options for the hint component.", "isComponent": true }, { "name": "errorMessage", "type": "object", "required": false, "description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.", "isComponent": true }, { "name": "formGroup", "type": "object", "required": false, "description": "Options for the form-group wrapper", "params": [ { "name": "classes", "type": "string", "required": false, "description": "Classes to add to the form group (e.g. to show error state for the whole group)" } ] }, { "name": "fieldset", "type": "object", "required": false, "description": "Options for the fieldset component (e.g. legend).", "isComponent": true }, { "name": "classes", "type": "string", "required": false, "description": "Classes to add to the date-input container." }, { "name": "attributes", "type": "object", "required": false, "description": "HTML attributes (for example data attributes) to add to the date-input container." } ]