Page Patterns
EmbeddedPage
A page served elsewhere, shown as the whole screen.
import { EmbeddedPage } from 'faifo-design'EmbeddedPage shows a sandboxed page from another site edge to edge below the shell's top bar, for
example a product introduction.
#When to use
- Use it when the content is owned by another site and the shell should stay in place.
- The screen has no page header of its own; the embedded page provides its heading.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#Embedded page
A page served by another site shown as the whole screen, edge to edge below the top bar, such as a product introduction for an app the company has not bought. Sandboxed, with a visually hidden heading; the host chooses the URL.
Product introduction
Show codeHide code
import { EmbeddedPage } from 'faifo-design'
export const Example = () => (
<EmbeddedPage src="/help-theme" title="Product introduction" />
)#Contract
#Embedded page
EmbeddedPage({ src, title }) shows a page served by another site as the whole screen, edge to
edge below the shell's top bar: for example the introduction of an app the company has not bought.
It renders a section with a visually hidden level-one heading (title) and one iframe named by the
same title. The main column holding it becomes a viewport-high flex column and the page grows into
what the location bar leaves (that bar is taller on touch screens than --faifo-app-topbar-height), so
the suite's document does not scroll and the frame scrolls inside. The page is the main column's child
or grandchild; the backend content slot passes the height on and drops its padding when it holds an
embedded page directly, and the screen passes topbar: false, since the embedded page carries its own
heading. The frame is
sandboxed (allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox,
never top navigation) and sends strict-origin-when-cross-origin referrers. The host chooses and
validates the URL: another origin, over https. The embedded site must allow framing by the suite's
origin (frame-ancestors); a refused frame shows the browser's own error. Specimen embedded-page.
#API
Generated from the package source. A property without a description has none in the source yet.
#EmbeddedPageComponent
A page served elsewhere shown as this whole screen, edge to edge below the shell's top bar: for example a product introduction from a marketing site. The screen has no page header of its own, so the title is its visually hidden heading. The frame is sandboxed (scripts, forms and pop-ups, no navigating this page) and tells the other site only this origin.
| Property | Description | Type | Default |
|---|---|---|---|
srcrequired | The page to show: an absolute http(s) URL on another origin, chosen by the host. | string | – |
titlerequired | Names the screen (a visually hidden level-one heading) and the frame. | string | – |
#Types
#EmbeddedPageProps
The properties of EmbeddedPage, listed above.
#Hooks
The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.
embedded-pageembedded-page-frame