State & Context·loomora → useLoomora
useLoomora
Returns the recursively merged configuration of the closest LoomoraProvider parent, including theme tokens, responsive breakpoints, component defaults, and translation helpers.
Interactive live playground
Interact with the hook state and inspect computed return values in real time.
Loomora Context
LoomoraProvider
Access configuration, translation helpers, and component defaults from anywhere in your tree.
Context Overview
Button Color:info
Active Locale:en
RTL Direction:false
How to call
Import directly from the Loomora root package in any React client component.
import { useLoomora } from 'loomora'
export function ConfigInspector() {
const { button, settings, t } = useLoomora()
return (
<div>
<p>Default Button Color: {button?.defaultColor}</p>
<p>Locale: {settings?.locale}</p>
</div>
)
}Return values & methods
API signatures and utilities returned by this hook.
| Method / Prop | Type | Description |
|---|---|---|
| button | ButtonConfig | Default colors, sizes, corners, and loader titles for Button. |
| form | FormConfig | Global defaults for all form fields and inputs. |
| settings | SettingsConfig | Locale, RTL, and translation strategy settings. |
| translations | TranslationsConfig | All localized strings for countries, socials, dates, and form labels. |
| t | TranslateFn | Translation lookup function that checks provider overrides. |