LumnProvider

The root context provider for Lumn React components. It manages authentication, global styling (themes, colors), and API configuration.

typescript
import { LumnProvider, LumnPricing } from '@lumnsh/react';
function App() {
return (
<LumnProvider apiKey={process.env.NEXT_PUBLIC_LUMN_API_KEY} baseUrl={process.env.NEXT_PUBLIC_LUMN_API_BASE_URL}>
<LumnPricing />
</LumnProvider>
);
}

LumnProviderProps

Parameter reference
ParameterTypeRequiredDescriptionExample
apiKeystringRequiredYour Lumn API Key (Client-side safe).'lumn_test_...'
environmentLumnEnvironmentOptionalDisplay mode for UI components. Sandbox is for testing.'sandbox'
themeLumnThemeOptionalDefault theme for all child Lumn components.'dark'
accentColorstringOptionalAccent color for buttons and highlights (Hex/CSS).'#10b981'
baseUrlstringOptionalCustom API base URL (useful for proxying/on-prem).'https://lumn.sh'

Interactive UI & Output

Paste your API key above to try

Live Customization

Changing these settings on the LumnProvider will automatically propagate to all child components.

Preview (Propagated to LumnPricing)

Enter API key to see live preview