Container

Un elemento de diseño para centrar y restringir el ancho de su contenido.

xph0000xUso

Utilice la ranura predeterminada para centrar y restringir el ancho de su contenido.

Su ancho máximo está controlado por la variable CSS --ui-container.
<template>
  <UContainer>
    <Placeholder class="h-32" />
  </UContainer>
</template>

API (Edición española)

Props (Edición española)

Prop Default Type
as
'div'
any

The element or component this component should render as.

ui
{ base?: any; }

Slots

Slot Type
default
{}

Temas

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 (Edición española)

No recent changes