Skip to content

OrigamMain ​

<OrigamMain> is the central content slot of the application shell. It registers itself with the surrounding <OrigamLayout> via useLayoutMain so that drawers, app-bars, system-bars and bottom-navs push it around without overlapping. Renders as <main> by default.

Basic usage ​

vue
<template>
    <OrigamLayout>
        <OrigamAppBar />
        <OrigamDrawer />
        <OrigamMain>
            <RouterView />
        </OrigamMain>
    </OrigamLayout>
</template>

Scrollable ​

scrollable makes <OrigamMain> host its own scroll context. The inner __scroller element gets overflow-y: auto and the outer element switches to position: absolute so it fills the layout without contributing to the document scroll.

vue
<template>
    <OrigamLayout full-height>
        <OrigamMain scrollable>
            <!-- Long content; scrolls inside the main slot only -->
        </OrigamMain>
    </OrigamLayout>
</template>

Modifiers ​

vue
<template>
    <OrigamMain rounded>Rounded corners</OrigamMain>
    <OrigamMain border>Bordered main slot</OrigamMain>
</template>

Polymorphic tag ​

vue
<template>
    <!-- Override the default <main> if you need to nest two main slots
         (e.g. embedded mode or a portal). -->
    <OrigamMain tag="div">…</OrigamMain>
</template>

Slots ​

SlotSlot propsDescription
default—Page content.

Props (interface) ​

ts
interface IMainProps extends ITagProps, ICommonsComponentProps,
    IPaddingProps, IMarginProps, IBorderProps, IRoundedProps,
    IDimensionProps {
    scrollable?: boolean
}

Anatomy ​

html
<main class="origam-main [origam-main--scrollable]">
    <div class="origam-main__wrapper [origam-main__scroller]">
        <!-- default slot -->
    </div>
</main>

Design tokens consumed ​

<OrigamMain> reads its variables from packages/ds/src/assets/css/tokens/light.css and dark.css (SCSS twins under packages/ds/src/assets/scss/tokens/). The component also re-exports the --origam-layout---position-* family written by the surrounding <OrigamLayout> so its inner padding tracks every sibling drawer / app-bar.

CSS variableDefault
--origam-main---flex1 0 auto
--origam-main---max-width100%
--origam-main---background-colorinherits color.surface.default
--origam-main---colorinherits color.text.primary
--origam-main---width100%
--origam-main---height100%
--origam-main---displayflex
--origam-main---positionabsolute
--origam-main---position-top0
--origam-main---position-left0
--origam-main---transition-durationinherits motion.duration.medium
--origam-main---transition-propertyall
--origam-main---transition-timing-functioninherits motion.easing.standard
--origam-main__scroller---max-width100%
--origam-main__scroller---positionrelative

The component also reads the layout-bound positions: --origam-layout---position-top, --origam-layout---position-bottom, --origam-layout---position-left, --origam-layout---position-right.

Accessibility ​

  • Renders <main> by default — the landmark is correct out of the box. Screen-reader users should be able to jump to the main slot via the "main" landmark shortcut.
  • Keep a single <OrigamMain> per page.
  • When scrollable, the inner scroll context still receives keyboard focus and arrow-key scrolling for free.

Theming notes ​

  • The component is theme-aware via its consumed tokens. Switching <html data-theme="…"> re-resolves them instantly.
  • A sub-tree can opt into a different theme via <OrigamThemeProvider>.
  • OrigamLayout — application shell.
  • OrigamSheet — generic surface, similar API.
  • OrigamContainer — outer wrapper with breakpoint-aware max-width.