Skip to content

ConfigProvider

Provides scoped defaults for size, hue, locale, and theme to its children. Nest providers freely; the deepest one wins.

Usage

vue
<template>
	<EpConfigProvider size="lg" hue="accent">
		<HeroForm />
	</EpConfigProvider>
</template>

Any Ep* component rendered inside <HeroForm> uses size="lg" and hue="accent" unless it overrides those props explicitly.

Reading config in a custom component

ts
import { useEpConfig } from "vue-ecosphere";

const config = useEpConfig();
// config.size.value, config.hue.value, config.locale.value

API

Props

NameTypeDefaultDescription
themeTheme"auto"Active color theme. `"auto"` follows `prefers-color-scheme` and reacts to OS-level changes at runtime.
sizeEpSize"md"Default component size for descendants that support sizing.
localeEpLocaleundefinedBCP-47 locale tag. Defaults to `navigator.language` or `"en"`.
tagstring"div"Root element tag. Defaults to a fragment-like `<div>`.

Slots

SlotScopeDescription
default

Released under the MIT License. Built with VitePress.