Castle UI can be imported into your project in the following steps:
1. Install
yarn add @passfort/castle
Copy
or
npm i @passfort/castle
Copy
2. Add ThemeProvider
Add ThemeProvider
to the root of your application.
import { ThemeProvider } from '@passfort/castle'export const App = () => {<ThemeProvider>{...}</ThemeProvider>}content_copyCopy
3. Import index.css
make sure to import index.css in your root component
import '@passfort/castle/lib/index.css'content_copyCopy
4. Localisation
Castle UI Reads from the root html
element's lang
attribute to determine the locale. Make sure to set the lang
attribute to the desired locale.
<html lang="de-DE">...</html>content_copyCopy
Locales we support are: en-US
, de-DE
, fr-FR
, ja-JP
, es-ES
, it-IT
, zh-CN