Learn how to install and use the MHCLG Svelte Component Library in your SvelteKit projects.
The component library is publicly available on npm, making installation straightforward:
The component library includes all necessary CSS and JavaScript files. When you install the package, GOV.UK Frontend styles & assets as well as custom styles and assets are automatically included out of the box.
Add this script tag to your app.html
file in the body section.
This is required because the GOV.UK Frontend CSS that ships with our component
library checks the document body for JavaScript availability to progressively
enhance components.
Import components in your Svelte files:
If you need help or have questions: