App

GitLab
Envolve o seu app para fornecer configurações globais e mais.

Uso

Este componente implementa o ConfigProvider do Reka UI para fornecer configuração global a todos os componentes:

  • Enables all primitives to inherit global reading direction.
  • Enables changing the behavior of scroll body when setting body lock.
  • Much more controls to prevent layout shifts.

Ele também usa o ToastProvider e o TooltipProvider para fornecer toasts e tooltips globais, além de modais e slideovers programáticos.

Envolva toda a sua aplicação com o componente App no seu arquivo app.vue:

app.vue
<template>
  <NApp>
    <NuxtPage />
  </NApp>
</template>
Aprenda a usar a prop locale para alterar o locale do seu app. Isso também controla o formato de data/hora em componentes como Calendar, InputDate e InputTime.
Aprenda a usar a prop locale para alterar o locale do seu app. Isso também controla o formato de data/hora em componentes como Calendar, InputDate e InputTime.

API

Props

Prop Default Type
tooltip TooltipProviderProps
toaster null | ToasterProps
locale Locale<T>
portal'body' string | false | true | HTMLElement
dir'ltr' "ltr" | "rtl"

The global reading direction of your application. This will be inherited by all primitives.

scrollBodyboolean | ScrollBodyOption

The global scroll body behavior of your application. This will be inherited by the related primitives.

nonce string

The global nonce value of your application. This will be inherited by the related primitives.

teleportTo string | HTMLElement

The global default teleport target for all portalled primitives (e.g. Dialog, Popover, Tooltip). Individual *Portal components can still override this via their own to prop. Useful when rendering inside a custom element / shadow DOM.

Slots

Slot Type
default{}

Changelog

No recent changes