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.

Live
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.

5 methods
Method / PropTypeDescription
buttonButtonConfigDefault colors, sizes, corners, and loader titles for Button.
formFormConfigGlobal defaults for all form fields and inputs.
settingsSettingsConfigLocale, RTL, and translation strategy settings.
translationsTranslationsConfigAll localized strings for countries, socials, dates, and form labels.
tTranslateFnTranslation lookup function that checks provider overrides.