## Customization structure Frontegg offers extensive customization options to help you align the user experience with your brand and product needs. You can customize the look and feel, text, and behavior of the following areas: - **Login box** (authentication screens) - **Self-service portal** (admin portal for end users) - **Emails** (transactional emails triggered by various flows) br Depending on your use case, you can implement customization via: - **Frontegg Builder** (UI-based customization for many basic options) - **Frontend SDK** for [Embedded integrations](/ciam/guides/customizations/advanced#embedded-login-sdk-based) - **Frontend SDK** with an override passed via **Frontegg API** (`metadataOverrides`) for [Hosted integrations](/ciam/guides/customizations/advanced#hosted-login-sdk-and-api-based) ### Frontegg login box and self-service (admin) portal customization options Frontegg offers multiple customization options to style and enhance your interface to suit your brand's style guidelines and business needs. You can customize your self-service portal, login box, and text component (localizations). This topic will give you a general overview of the tree-like architecture of customization in Frontegg through code. Once you have the basics, the sky's the limit in terms of what you can customize. #### General attributes The customization options are split into various attributes that apply to both the Hosted and Embedded Modes and reflect the various customization options (style, configuration, and localization) we've mentioned previously. | Attribute | Description | Usage | | --- | --- | --- | | `integrations` | Controls the visibility of all integrations | self-service portal | | `configuration` | Controls the visibility and enablements of your portal configurations | self-service portal | | `navigation` | Controls the visibility of all self-service portal components, e.g., SSO, Roles, Groups, etc. `hidden`, `visible`, `byPermission` | self-service portalself-service portal self-service portal + login box | | `transitions` | Defines generic behaviors for CSS transitions | | | `breakpoints` | Defines breakpoints for different resolutions (CSS media like) | | | `direction` | LeftToRight | RightToLeft | | | `components` | Allows to override ALL of the material-ui components styles we are using such as: `MuiAlert`, `MuiAutocomplete`, `MuiButton` etc. | | | `loginBox` | Customization options for the Login box (more info [here](/ciam/guides/customizations/login-box/no-code)) | | | `adminPortal` | Customization options for the self-service portal (more info [here](/ciam/guides/customizations/login-box/no-code)) | | | `typography` | Defines which fonts to use and which fonts families | | You can customize multiple aspects of your Frontegg default styles and texts either by passing these via `themeOptions` for customizing styles or using `localizations` for modifying or translating texts. #### Styling architecture To know what and how to style, it is important to understand that the Frontegg style architecture is a top-down tree where the levels are merged-up. The styles at any given level apply unless overridden by a conflicting style below within the same branch. The image below demonstrates this top-down approach. ![architechture](/assets/architechture.ad90dda38e3bda0c9024f39acadd20b0288b582e6b40b1992372bf0cfccbd1ee.7198d1a0.png) br The Frontegg style architecture defines some global customization styles that can be applied both for your login-box and self-service portal, as well as customization styles that you can apply for each separately. The idea is that you can always reach the level of customization you need within the granularity that your application requires. This top-down approach makes it easy to customize components that share the same design regardless of where the component appears in your application. But it also allows for the precision you need for uniquely styling specific parts of your application. As shown in the snippet above, the topmost level is the global level. A style applied at the global level impacts all Frontegg components unless you explicitly override that style at a lower level. Frontegg base components rely on the great [Material UI](https://mui.com/) (as we believe that wheels shouldn't be re-invented). Therefore, some of the links you see below will refer to the documentation of Material UI. br ##### `themeOptions` Object Your `themeOptions` object can contain custom styles for all the available levels. Here is an object containing all levels and their corresponding styling options. ``` const themeOptions = { // Global styles palette: ThemePalette; typographyStyleOptions: CSSProperties; spacing: Spacing; shadows: Shadows; transitions: Transitions; breakpoints: Breakpoints; direction: Direction; components: ComponentsOptions; typography: Typography; // Login box styles loginBox: { // Easier way to load predefined themes themeName: 'classic' | 'modern' | 'vivid' | 'dark'; // Specific customization options for the accept invitation page acceptInvitation: AcceptInvitationPageTheme; // Specific customization options for the activate account page activateAccount: ActivateAccountPageTheme; // Specific customization options for the forgot password page forgotPassword: ForgotPasswordPageTheme; // Specific customization options for the reset password page resetPassword: ResetPasswordPageTheme; // Specific customization options for the login page login: LoginPageTheme; // Specific customization options for the signup page signup: SignupPageTheme; // Specific customization options for the social logins section socialLogins: SocialLoginsTheme; // Specific customization options for the loader of the login box loader: LoaderTheme; }, // Admin Portal styles adminPortal: { palette?: ThemePalette; typographyStyleOptions?: Partial; spacing?: SpacingOptions; shadows?: Shadows; transitions?: TransitionsOptions; breakpoints?: BreakpointsOptions; direction?: Direction; components?: ComponentsOptions; typography?: TypographyOptions; layout: { fullScreenMode: boolean; }; } }; ``` br You do not need this entire master object in your code. Instead, just include styles for properties where you want to override the default. **Types of custom styles** If you are using typescript, the interface for the style options is exposed and you can easily import it to see what options are available. `import { FronteggAppOptions } from '@frontegg/types';` If you are not using typescript, look in the frontegg package for the `frontegg/types` folder to see the style options. #### Localizations architecture The `localizations` initiation attribute, you can customize the text that appears in your Frontegg components— you can set custom button text, add custom input placeholders, write your own input labels, display custom error messages, and more. Similar to the other styling customization in Frontegg, the `localization` object adheres to the styling structure of our top-down approach. ##### `localizations` object The `localizations` object is structured in a way that the outermost layer includes the key indicating the language. For example, for English, use `en`. Within the language key object, you will include your `adminPortal` and `loginBox` objects— and within these objects, you will indicate the customization you need. Use more than one language key to customize the text in multiple languages. Here's an example with two language keys where each key has sections for the `adminPortal` and `loginBox`. br ``` const localizations = { en: { adminPortal: { // Your code here, }, loginBox: { // Your code here, }, }, es: { adminPortal: { // Your code here, }, loginBox: { // Your code here, }, }, }; ``` ##### Auto-translation for authentication screens and self-service Frontegg's default language is English, with built-in support for automatic translation across both the authentication (login) experience and the self-service portal. We currently support **25** languages, enabling localized user experiences out of the box—no additional configuration required. br - en – English - es – Spanish - zh – Chinese (Simplified) - fr – French - de – German - pt-BR – Portuguese (Brazil) - ja – Japanese - ko – Korean - ar – Arabic - ru – Russian - it – Italian - nl – Dutch - he – Hebrew - tr – Turkish - hi – Hindi - id – Indonesian - vi – Vietnamese - pl – Polish - sv – Swedish - nb – Norwegian Bokmål - da – Danish - th – Thai - uk – Ukrainian - ro – Romanian - cs – Czech br To enable this functionality, pass the autoTranslate flag to Frontegg: br ```JavaScript const localization: LocalizationsOverrides = { // defaultLanguage: 'en' The default language is English, but it can be replaced with any of the language from the above list autoTranslate: { enabled: true; } }; ``` br For applications using Frontegg's hosted login, follow the instructions [for the login box](/ciam/guides/customizations/advanced) and [for the self-service portal](/ciam/guides/customizations/advanced) to pass `metadataOverrides` and enable the required `autoTranslate` flag as detailed in the advanced customization [guide](/ciam/guides/customizations/advanced). For those implementing embedded login, refer to the prerequisite versions listed below. br Prerequisites Note that the following versions are required to use the feature: @frontegg/react@7.9.0 @frontegg/angular@7.16.0 @frontegg/vue@4.8.0 @frontegg/nextjs@9.2.6 @frontegg/js@7.76.0