skip section navigation

PageContainer

PageContainer makes a centered page with a main landmark, responsive padding and a vertical gap between children. give it a unique pageId and a CSS length for maxWidth.

usage

svelte
<script>
	import { PageContainer, Card } from '@ciabi/loafkit-ui';
</script>

<PageContainer pageId="saved-articles" maxWidth="64rem">
	<h1>saved articles</h1>
	<Card title="A small reading list">
		<p>start with the next thing you want to read.</p>
	</Card>
</PageContainer>

use a section or div for another panel within this page. nesting PageContainer would add another main landmark and another layer of padding. this example is copyable root-page code; it isn’t mounted inside the documentation page’s own main landmark.

composition

  • PageContainer
    • page content

API reference

PageContainer

Component
pageId

unique ID for the main landmark.

maxWidth

CSS maximum content width.

children

the page contents.

class
Default: ''

extra classes on the component root.

style

inline styles on the component root.