Page
Use s-page
as the main container for placing content in your app. Page comes with preset layouts and automatically adds spacing between elements.
Anchor to propertiesProperties
Use as the outer wrapper of a page
- Anchor to headingheadingstring
The main page heading
- Anchor to inlineSizeinlineSize"small" | "base" | "large"Default: 'base'
The inline size of the page
base
corresponds to a set default inline sizelarge
full width with whitespace
Anchor to slotsSlots
- Anchor to asideasideHTMLElement
The content to display in the aside section of the page.
This slot is only rendered when
is "base".
- HTMLElement
Navigations back actions for the page.
Only accepts
Link
components.- Anchor to childrenchildrenHTMLElement
The content of the Page.
- Anchor to primary-actionprimary-actionHTMLElement
The primary action for the page.
Only accepts a single
Button
component with avariant
ofprimary
.- Anchor to secondary-actionssecondary-actionsHTMLElement
Secondary actions for the page.
Only accepts
and
Button
components with avariant
ofsecondary
orauto
.
Examples
jsx
<s-page heading="Products"> <s-section> <s-text>Hello World</s-text> </s-section> </s-page>
html
<s-page heading="Products"> <s-section> <s-text>Hello World</s-text> </s-section> </s-page>
Anchor to examplesExamples
Component examples
Anchor to example-basic-usageBasic usage
Anchor to example-page-with-headingPage with heading
Shows a page with a clear heading and descriptive text, illustrating how to use the page component with a title.
Anchor to example-small-inline-size-for-focused-contentSmall inline size for focused content
Illustrates a page with a small inline size, ideal for focused, compact content like settings or forms with minimal information.
Anchor to example-large-inline-size-for-wide-contentLarge inline size for wide content
Demonstrates a page with a large inline size, perfect for displaying broader content like analytics or dashboards with multiple information sections.
Page with heading
Examples
Page with heading
Description
Shows a page with a clear heading and descriptive text, illustrating how to use the page component with a title.
jsx
<s-page heading="Product catalog" inline-size="base"> <s-section> <s-text>Manage your product catalog and inventory.</s-text> </s-section> </s-page>
html
<s-page heading="Product catalog" inline-size="base"> <s-section> <s-text>Manage your product catalog and inventory.</s-text> </s-section> </s-page>
Small inline size for focused content
Description
Illustrates a page with a small inline size, ideal for focused, compact content like settings or forms with minimal information.
jsx
<s-page heading="Store settings" inline-size="small"> <s-section> <s-stack gap="base"> <s-text>Configure your basic store preferences.</s-text> <s-text-field label="Store name" /> <s-button variant="primary">Save</s-button> </s-stack> </s-section> </s-page>
html
<s-page heading="Store settings" inline-size="small"> <s-section> <s-stack gap="base"> <s-text>Configure your basic store preferences.</s-text> <s-text-field label="Store name"></s-text-field> <s-button variant="primary">Save</s-button> </s-stack> </s-section> </s-page>
Large inline size for wide content
Description
Demonstrates a page with a large inline size, perfect for displaying broader content like analytics or dashboards with multiple information sections.
jsx
<s-page heading="Store analytics" inline-size="large"> <s-section> <s-stack gap="base"> <s-text>Monitor your store performance across all channels.</s-text> <s-grid> <s-grid-item> <s-box padding="base" background="base" borderWidth="base" borderColor="base" borderRadius="base" > <s-heading>Sales</s-heading> <s-text type="strong">$12,456</s-text> </s-box> </s-grid-item> <s-grid-item> <s-box padding="base" background="base" borderWidth="base" borderColor="base" borderRadius="base" > <s-heading>Orders</s-heading> <s-text type="strong">145</s-text> </s-box> </s-grid-item> </s-grid> </s-stack> </s-section> </s-page>
html
<s-page heading="Store analytics" inline-size="large"> <s-section> <s-stack gap="base"> <s-text>Monitor your store performance across all channels.</s-text> <s-grid> <s-grid-item> <s-box padding="base" background="base" borderWidth="base" borderColor="base" borderRadius="base" > <s-heading>Sales</s-heading> <s-text type="strong">$12,456</s-text> </s-box> </s-grid-item> <s-grid-item> <s-box padding="base" background="base" borderWidth="base" borderColor="base" borderRadius="base" > <s-heading>Orders</s-heading> <s-text type="strong">145</s-text> </s-box> </s-grid-item> </s-grid> </s-stack> </s-section> </s-page>