CSS

You should add the following import to your root +layout.svelte file:

<script>
	import "@nais/ds-svelte-community/css";
</script>

This CSS extends @navikt/ds-css and will style as as Link components.

If you want unstyled a, you can add the class unstyled to prevent this styling.

Tailwind

If you want to use Tailwind, follow the official guide to configure SvelteKit with Tailwind.

Although, you might not need to add @tailwind base; and @tailwind components; to your .css file.

Darkside

To preview darkside, import @nais/ds-svelte-community/css/darkside.css instead of @nais/ds-svelte-community/css.

Add navds-theme as a class to your body element, and optionally the dark class.

Wrap the entire page in a <Theme> component.

<script lang="ts">
	import { Theme } from "@nais/ds-svelte-community";
</script>

<Theme theme="dark">
	Page contents
</Theme