Page
The Page component is a specialized wrapper for top-level pages. It handles document metadata (SEO, Open Graph, Twitter Cards) and provides a standard "main" container for content.
Props
Prop | Type | Default | Description |
|---|---|---|---|
title | string | '' | The title of the page (appears in browser tab and search results). |
description | string | '' | A brief summary of the page for search engines and social previews. |
image | string | '' | URL of the image used for social media previews. |
imageAlt | string | '' | Alt text for the social preview image. |
url | string | '' | The canonical URL of the page. |
siteName | string | '' | The name of the overall website. |
type | 'website' | 'article' | 'profile' | 'website' | The type of Open Graph object. |
twitterCard | 'summary' | 'summary_large_image' | 'summary_large_image' | The type of Twitter card to render. |
themeColor | string | '' | Color for the browser toolbar/address bar. |
robots | string | 'index, follow' | Instructions for search engine crawlers. |
keywords | string | '' | Comma-separated keywords for the page. |
class | string | '' | CSS classes to apply to the main container. |
Samples
Social Preview Simulator
See how your page metadata would appear when shared on platforms like Discord, Slack, or LinkedIn.
Preview Title
Preview Description
Image URL
Site Name
Mock Link Preview
fluidui.io
Fluid UI Svelte
A highly flexible and customizable UI library built with Svelte 5 and Tailwind CSS 4.
Basic Usage
The Page component wraps your entire route content and automatically manages the document head.
(This documentation page itself is wrapped in a Page component. Check the browser tab title or inspect the HTML source to see the metadata in action.)
0
<script>1
import { Page } from 'fluid-ui-svelte/components';2
import { Text } from 'fluid-ui-svelte/base';3
</script>4
5
<Page 6
title="Home" 7
description="Welcome to my awesome website."8
>9
<Text type="h1">Hello World</Text>10
<Text>This content is inside a semantic main container.</Text>11
</Page>With Detailed Metadata
You can provide comprehensive metadata for SEO and social sharing previews (Open Graph & Twitter).
0
<script>1
import { Page } from 'fluid-ui-svelte/components';2
</script>3
4
<Page 5
title="My Article" 6
description="A deep dive into Fluid UI Svelte."7
type="article"8
siteName="My Blog"9
url="https://example.com/blog/article"10
image="https://example.com/cover.jpg"11
imageAlt="Cover image showing Fluid UI components"12
twitterCard="summary_large_image"13
keywords="svelte, ui, library, framework"14
robots="index, follow"15
>16
<!-- Content here -->17
</Page>