Usage
The Main component renders a <main> element that works together with the Header component to create a full-height layout that extends to the viewport's available height.
The Main component uses the
--b24ui-header-height CSS variable to position itself correctly below the Header.Examples
Within app.vue
Use the Main component in your app.vue or in a layout:
app.vue
<template>
<B24App>
<B24Header />
<B24Main>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</B24Main>
<B24Footer />
</B24App>
</template>
API
Props
Slots
Theme
app.config.ts
export default defineAppConfig({
b24ui: {
main: {
base: 'min-h-[calc(100vh-var(--b24ui-header-height))]'
}
}
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'
export default defineConfig({
plugins: [
vue(),
bitrix24UIPluginVite({
b24ui: {
main: {
base: 'min-h-[calc(100vh-var(--b24ui-header-height))]'
}
}
})
]
})