A document.title
manager for Svelte.
npm i svelte-document-title
// OR
yarn add svelte-document-title
Note: to use this library in sapper, install as devDependency. See the link.
Local demo:
git clone https://github.com/andrelmlins/svelte-document-title.git
cd svelte-document-title
npm install && npm rum dev
An example of how to use the library:
<script>
import DocumentTitle from "svelte-document-title";
</script>
<DocumentTitle title="XXX">
<p>Hello World!!!</p>
</DocumentTitle>
Component props:
Prop | Type | Description |
---|---|---|
title | string | Title showing in document |
Download stats for this NPM package
Svelte Document Title is open source software licensed as MIT.