UNPKG

govuk-frontend

Version:

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.

75 lines (74 loc) 2.49 kB
[ { "name": "text", "type": "string", "required": true, "description": "If `html` is set, this is not required. Text for the button. If `html` is provided, the `text` option will be ignored." }, { "name": "html", "type": "string", "required": true, "description": "If `text` is set, this is not required. HTML for the button. If `html` is provided, the `text` option will be ignored." }, { "name": "type", "type": "string", "required": false, "description": "Type of the button, determining its behaviour in forms – `\"button\"`, `\"submit\"` or `\"reset\"`. Defaults to `\"submit\"`. This has no effect if `href` is set." }, { "name": "name", "type": "string", "required": false, "description": "Name of the button, sent when a form is submitted. This has no effect if `href` is set." }, { "name": "value", "type": "string", "required": false, "description": "Value of the button, sent when a form is submitted. This has no effect if `href` is set." }, { "name": "disabled", "type": "boolean", "required": false, "description": "Whether the button should be disabled. `disabled` and `aria-disabled` attributes will be set automatically. This has no effect if `href` is set." }, { "name": "href", "type": "string", "required": false, "description": "The URL that the button should link to." }, { "name": "classes", "type": "string", "required": false, "description": "Classes to add to the button." }, { "name": "attributes", "type": "object", "required": false, "description": "HTML attributes (for example data attributes) to add to the button." }, { "name": "preventDoubleClick", "type": "boolean", "required": false, "description": "Prevent accidental double clicks on submit buttons from submitting forms multiple times. This has no effect if `href` is set." }, { "name": "isStartButton", "type": "boolean", "required": false, "description": "Use for the main call to action on your service's start page." }, { "name": "id", "type": "string", "required": false, "description": "The ID of the button." } ]