Composables

useAppConfig

Source
Inject the merged AppConfig provided by the VyUI plugin.

Overview

useAppConfig (from @vyui/kit) injects the merged AppConfig provided by VyUI.install() / provideVyUI() — the same object you pass as app.use(VyUI, { ui: {...} }).

import { useAppConfig } from '@vyui/kit'

const appConfig = useAppConfig()
appConfig.ui.primary // 'green'

Fallback

Falls back to a sane default (green primary, slate gray, the default icon registry) when rendered outside a VyUI context — tests, isolated stories — so anything reading it, like useComponentIcons, doesn't crash.

Returns

AppConfig — the same shape passed to app.use(VyUI, { ui: {...} }), deep-merged with kit's defaults.

When to use it

Reach for it in app code that wants to read the active theme config reactively, e.g. to pick a color or icon at runtime.