Container

내용의 폭을 중심에 놓고 제한할 레이아웃 요소입니다.

Usage

기본 슬롯을 사용하여 컨텐츠의 너비를 중심에 놓고 제한합니다.

최대 너비는 --ui-container CSS 변수에 의해 제어됩니다.
<template>
  <UContainer>
    <Placeholder class="h-32" />
  </UContainer>
</template>

API 파일

Props (### Props)

Prop Default Type
as
'div'
any

The element or component this component should render as.

ui
{ base?: any; }

슬롯

Slot Type
default
{}

Theme 테마

app.config.ts
export default defineAppConfig({
  ui: {
    container: {
      base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8'
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'

export default defineConfig({
  plugins: [
    vue(),
    ui({
      ui: {
        container: {
          base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8'
        }
      }
    })
  ]
})

Changelog 파일

No recent changes