# createContext API

> Auto-generated API reference for `createContext` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/create-context

## Related

- https://0.vuetifyjs.com/composables/foundation/create-context
- https://0.vuetifyjs.com/composables/foundation/create-trinity
- https://0.vuetifyjs.com/composables/foundation/create-plugin
- https://0.vuetifyjs.com/guide/fundamentals/core

## Functions

### useContext

Injects a context provided by an ancestor component.

```ts
(key: ContextKey<Z>, defaultValue?: Z | undefined) => Z
```

### provideContext

Provides a context to all descendant components.

```ts
(key: ContextKey<Z>, context: Z, app?: App<any> | undefined) => Z
```

### createContext

```ts
(keyOrOptions?: ContextKey<Z> | CreateContextOptions | undefined, defaultValue?: Z | undefined) => readonly [() => Z, (context: Z, app?: App) => Z] | readonly [(key: string, defaultValue?: Z) => Z, (key: string, context: Z, app?: App) => Z]
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `suffix` | `string \| undefined` | — | no | Optional suffix to append to the runtime key |
