1. framework components
  2. locale provider

Locale Provider

Provides locale context to components for controlling reading direction.

Warning

This feature is currently marked as beta. Take caution when using for production. It may receive breaking changes before its stable release.

tsx
import { LocaleProvider } from '@skeletonlabs/skeleton-react';

export default function App() {
	return <LocaleProvider locale="en-US">{/* your app */}</LocaleProvider>;
}

Anatomy

Here’s an overview of how the LocaleProvider component is structured in code:

tsx
import { LocaleProvider } from '@skeletonlabs/skeleton-react';

export default function Anatomy() {
	return <LocaleProvider></LocaleProvider>;
}

API Reference

Root

PropDefaultType
locale'en-US'string

The locale to use for the application.

childrenReactNode

Context

PropDefaultType
children(locale: Locale) => ReactNode

View page on GitHub