Grail Layout Center Main
GrailLayoutCenterMain is a headless container for the center main content section of a GrailLayout. It holds the primary page content and is flanked by the left and right aside sections.
GrailLayoutCenterMain is a headless container for the center main content section of a GrailLayout. It holds the primary page content and is flanked by the left and right aside sections.
<main class="grail-layout-center-main">Main content</main><script lang="ts">
import GrailLayoutCenterMain from "./GrailLayoutCenterMain.svelte";
</script>
<GrailLayoutCenterMain>
<main>
<h1>Welcome</h1>
<p>This is the primary content.</p>
</main>
</GrailLayoutCenterMain>
// In your Svelte component:
import GrailLayoutCenterMain from "lily-design-system-svelte-headless/components/GrailLayoutCenterMain/GrailLayoutCenterMain.svelte";
<GrailLayoutCenterMain>
<!-- content -->
</GrailLayoutCenterMain>
<GrailLayout>
<GrailLayoutTopHeader>...</GrailLayoutTopHeader>
<GrailLayoutLeftAside>...</GrailLayoutLeftAside>
<GrailLayoutCenterMain>
<h1>Patient Dashboard</h1>
<p>Main content area with patient records, charts, and clinical notes.</p>
</GrailLayoutCenterMain>
<GrailLayoutRightAside>...</GrailLayoutRightAside>
<GrailLayoutBottomFooter>...</GrailLayoutBottomFooter>
</GrailLayout>
children: slot (required) -- content to render inside the center main section...restProps: unknown -- additional attributes spread onto the <div> element<main> element directly.<main> exposes a main landmark; there should be only one per pagemain role from the <main> element when used as a top-level landmarkThis headless component renders semantic HTML. The consumer provides all visual styling — no CSS, animations, or layout assumptions are baked in.
The consumer provides all CSS styling. The component renders with a .grail-layout-center-main class for targeting. No default styles are included — this is a fully headless component.
<main> element with class grail-layout-center-mainGrailLayoutCenterMain is used as a child of GrailLayout. Place a semantic <main> element inside for proper accessibility.
grail-layout — a responsive web design structure with header, left aside, center main, right aside, footergrail-layout-bottom-footer — grail layout bottom footer full width with <footer> taggrail-layout-left-aside — grail layout left aside sidebar with <aside> taggrail-layout-right-aside — grail layout right aside sidebar with <aside> taggrail-layout-top-header — grail layout top header full width with <header> tag<main> element for the center main content sectionrestProps onto the div for consumer customizationGenerated from this component's canonical metadata — the machine-checked source the implementations are held to.
<main> element exposes the main landmark<main> should be present per pagechildren: slot (required) -- content to render inside the center main section...restProps: unknown -- additional attributes spread onto the <div> element### Grail layout pattern: GrailLayout → GrailLayoutTop, GrailLayoutLeft, GrailLayoutCenter, GrailLayoutRight, GrailLayoutBottom
```tsx
<GrailLayout>
<GrailLayoutTopHeader>…</GrailLayoutTopHeader>
<GrailLayoutLeftAside>…</GrailLayoutLeftAside>
<GrailLayoutCenterMain>…</GrailLayoutCenterMain>
<GrailLayoutRightAside>…</GrailLayoutRightAside>
<GrailLayoutBottomFooter>…</GrailLayoutBottomFooter>
</GrailLayout>
```