# DelacourProvider (/docs/native/components/provider)

## Installation [#installation]

<ComponentInstall name="provider" />

## Usage [#usage]

```tsx title="app/_layout.tsx"
import "@/styles/global.css";
import { DelacourProvider } from "@/components/ui/provider";
import { Stack } from "expo-router";

export default function RootLayout() {
  return (
    <DelacourProvider>
      <Stack screenOptions={{ headerShown: false }} />
    </DelacourProvider>
  );
}
```

Mount it once, around everything — a root layout, an `App.tsx`.

## Layers [#layers]

Four, outermost first: `GestureHandlerRootView` → `SafeAreaProvider` →
`KeyboardProvider` → `<KeyboardStateSync />` beside the children. An app with a
[`BottomSheet`](/docs/native/components/bottom-sheet) mounts `BottomSheetProvider` inside it, from
the sheet's own subpath — the engine is an optional peer, so this component cannot.

<Callout type="warn">
The order is load-bearing, and one failure is silent: without the gesture root every `Pressable`
stops responding — no error, no warning, presses simply stop landing. Nesting a second copy of the
provider breaks the keyboard values the same quiet way, so mount exactly one. The full reasoning is
in [Provider](/docs/native/getting-started/provider).
</Callout>

## API Reference [#api-reference]

<TypeTable
  type={{
    children: { type: "ReactNode", required: true },
    style: {
      type: "StyleProp<ViewStyle>",
      description: "Reaches the gesture root. Carries no default — GestureHandlerRootView applies its own { flex: 1 } only while this is undefined, so passing a style means including it yourself.",
    },
    initialMetrics: {
      type: "Metrics | null",
      default: "initialWindowMetrics",
      description: "Seeds SafeAreaProvider so a cold start does not render a blank frame. Pass null to opt out — a default parameter only fires on undefined, so null is a value rather than an absence.",
    },
  }}
/>
