A collection of React code snippets for the GOVUK-UI component library.
You'll need to have the govuk-ui npm package installed for these code snippets to work properly, as they are wrappers for those React components.
There are snippets for each govuk-ui component, as listed below.
| Snippet shortcut | Description |
|---|---|
| govbl | Back link with empty href. |
| Snippet shortcut | Description |
|---|---|
| govbc | Breadcrumbs with two BreadcrumbItems. |
| Snippet shortcut | Description |
|---|---|
| govb | Button. |
| Snippet shortcut | Description |
|---|---|
| govcc | Character count with unset maxLength and label set as page heading. |
| Snippet shortcut | Description |
|---|---|
| govc | Checkboxes with a Legend and three CheckboxItems. Each CheckboxItem has its own Label. |
| Snippet shortcut | Description |
|---|---|
| govd | A DateInput with a Legend and Hint. |
| Snippet shortcut | Description |
|---|---|
| goves | An ErrorSummary with an ErrorSummaryMessage. |
| Snippet shortcut | Description |
|---|---|
| govfu | A FileUpload with a Label. |
| Snippet shortcut | Description |
|---|---|
| govr | Radios with two options and legend set as page heading. |
| Snippet shortcut | Description |
|---|---|
| govh | Header with a homepageUrl property. |
| Snippet shortcut | Description |
|---|---|
| govit | InsetText with customizable text. |
| Snippet shortcut | Description |
|---|---|
| govpb | PhaseBanner with a phase property and customizable text. |
| Snippet shortcut | Description |
|---|---|
| govs | Select with an id property and three SelectItem children with values and display text. |
| Snippet shortcut | Description |
|---|---|
| govtab | Tabs with two TabItems, each with an id, a label, and customizable content. |
| Snippet shortcut | Description |
|---|---|
| govti | Input with a name property and a Label with a class and isPageHeading properties. |
| Snippet shortcut | Description |
|---|---|
| govta | Textarea with a name property and a Label with a class and isPageHeading properties. |
| Snippet shortcut | Description |
|---|---|
| govt | Typography with customizable text. |
| govth1 | Typography with component set to "h1" and customizable text. |
| Snippet shortcut | Description |
|---|---|
| govwt | WarningText with iconFallbackText property and customizable text. |