Passage React Element UI Customization

Learn how to style the Passage React Elements

Customizing the Passage React Elements is done the same way as the standard Passage Elements, but props are named as per React convention. Learn more about UI customization.

PassageLightTheme

The PassageTheme component can customize the look and feel of the Passage Element to match your brand.

src/login.tsx
import React from 'react';
import { PassageAuth, PassageTheme } from '@passageidentity/passage-react';
 
export const RegisterPage: React.FC = () => {
    return (
        <>
            <h1>Example Register Page</h1>
            <PassageTheme primaryColor="#ff0000" />
            <PassageRegister />
        </>
    );
};

Props

NameRequiredTypeDefault Value
bodyFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

headerFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

containerBackgroundColorNostring#fff
containerMaxWidthNostring300px
containerMarginNostringauto
containerPaddingNostring30px 30px 20px
errorColorNostring#dd0031
bodyFontSizeNostring14px
bodyFontWeightNostring400
bodyTextColorNostring#000
headerFontSizeNostring24px
headerFontWeightNostring700
headerTextColorNostring#000
anchorTextColorNostring#000
anchorHoverColorNostring#4d4d4d
anchorActiveColorNostring#6b6b6b
otpInputBackgroundColorNostring#d7d7d7
inputTextColorNostring#000
inputBoxBackgroundColorNostring#fff
inputBoxBorderRadiusNostring5px
checkboxBackgroundColorNostring#000
checkboxTextColorNostring#fff
controlBorderRadiusNostring5px
controlBorderColorNostring#d7d7d7
controlBorderActiveColorNostring#000
buttonFontSizeNostring16px
buttonFontWeightNostring400
buttonWidthNostring50%
primaryButtonBackgroundColorNostring#000
primaryButtonTextColorNostring#fff
primaryButtonBorderRadiusNostring5px
primaryButtonBorderColorNostring#000
primaryButtonBorderWidthNostring0px
primaryButtonBorderHoverColorNostring#000
primaryButtonTextHoverColorNostring#fff
primaryButtonBackgroundHoverColorNostring#4d4d4d
primaryButtonTextActiveColorNostring#fff
primaryButtonBackgroundActiveColorNostring#6b6b6b
primaryButtonBorderActiveColorNostring#000
secondaryButtonBackgroundColorNostring#fff
secondaryButtonTextColorNostring#000
secondaryButtonBorderRadiusNostring5px
secondaryButtonBorderColorNostring#000
secondaryButtonBorderWidthNostring0px
secondaryButtonBorderHoverColorNostring#4d4d4d
secondaryButtonTextHoverColorNostring#000
secondaryButtonBackgroundHoverColorNostring#d7d7d7
secondaryButtonTextActiveColorNostring#000
secondaryButtonBackgroundActiveColorNostring#e0e0e0
secondaryButtonBorderActiveColorNostring#6b6b6b
tableHeaderBorderColorNostring#d7d7d7
tableRowHoverColorNostring#e0e0e0
tableRowBorderColorNostring#e8e8e8
tablePaginatorSelectedColorNostring#d7d7d7
tablePaginatorHoverColorNostring#e8e8e8

PassageDarkTheme

The PassageTheme component can customize the look and feel of the Passage Element to match your brand.

src/login.tsx
import React from 'react';
import { PassageAuth, PassageTheme } from '@passageidentity/passage-react';
 
export const RegisterPage: React.FC = () => {
    return (
        <>
            <h1>Example Register Page</h1>
            <PassageTheme primaryColor="#ff0000" />
            <PassageRegister />
        </>
    );
};

Props

NameRequiredTypeDefault Value
bodyFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

headerFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

containerBackgroundColorNostring#fff
containerMaxWidthNostring300px
containerMarginNostringauto
containerPaddingNostring30px 30px 20px
errorColorNostring#dd0031
bodyFontSizeNostring14px
bodyFontWeightNostring400
bodyTextColorNostring#000
headerFontSizeNostring24px
headerFontWeightNostring700
headerTextColorNostring#000
anchorTextColorNostring#000
anchorHoverColorNostring#4d4d4d
anchorActiveColorNostring#6b6b6b
otpInputBackgroundColorNostring#d7d7d7
inputTextColorNostring#000
inputBoxBackgroundColorNostring#fff
inputBoxBorderRadiusNostring5px
checkboxBackgroundColorNostring#000
checkboxTextColorNostring#fff
controlBorderRadiusNostring5px
controlBorderColorNostring#d7d7d7
controlBorderActiveColorNostring#000
buttonFontSizeNostring16px
buttonFontWeightNostring400
buttonWidthNostring50%
primaryButtonBackgroundColorNostring#000
primaryButtonTextColorNostring#fff
primaryButtonBorderRadiusNostring5px
primaryButtonBorderColorNostring#000
primaryButtonBorderWidthNostring0px
primaryButtonBorderHoverColorNostring#000
primaryButtonTextHoverColorNostring#fff
primaryButtonBackgroundHoverColorNostring#4d4d4d
primaryButtonTextActiveColorNostring#fff
primaryButtonBackgroundActiveColorNostring#6b6b6b
primaryButtonBorderActiveColorNostring#000
secondaryButtonBackgroundColorNostring#fff
secondaryButtonTextColorNostring#000
secondaryButtonBorderRadiusNostring5px
secondaryButtonBorderColorNostring#000
secondaryButtonBorderWidthNostring0px
secondaryButtonBorderHoverColorNostring#4d4d4d
secondaryButtonTextHoverColorNostring#000
secondaryButtonBackgroundHoverColorNostring#d7d7d7
secondaryButtonTextActiveColorNostring#000
secondaryButtonBackgroundActiveColorNostring#e0e0e0
secondaryButtonBorderActiveColorNostring#6b6b6b
tableHeaderBorderColorNostring#d7d7d7
tableRowHoverColorNostring#e0e0e0
tableRowBorderColorNostring#e8e8e8
tablePaginatorSelectedColorNostring#d7d7d7
tablePaginatorHoverColorNostring#e8e8e8

PassageTheme (Deprecated)

Note: PassageTheme has been deprecated. Use the PassageLightTheme or PassageDarkTheme components instead. PassageTheme will now apply a Light theme.

The PassageTheme component can customize the look and feel of the Passage Element to match your brand.

src/login.tsx
import React from 'react';
import { PassageAuth, PassageTheme } from '@passageidentity/passage-react';
 
export const RegisterPage: React.FC = () => {
    return (
        <>
            <h1>Example Register Page</h1>
            <PassageTheme primaryColor="#ff0000">
                <PassageRegister />
            </PassageTheme>
        </>
    );
};

Props

NameRequiredTypeDefault Value
bodyFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

headerFontFamilyNostring

'Helvetica', BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif

containerBackgroundColorNostring#fff
containerMaxWidthNostring300px
containerMarginNostringauto
containerPaddingNostring30px 30px 20px
errorColorNostring#dd0031
bodyFontSizeNostring14px
bodyFontWeightNostring400
bodyTextColorNostring#000
headerFontSizeNostring24px
headerFontWeightNostring700
headerTextColorNostring#000
anchorTextColorNostring#000
anchorHoverColorNostring#4d4d4d
anchorActiveColorNostring#6b6b6b
otpInputBackgroundColorNostring#fff
inputTextColorNostring#000
inputBoxBackgroundColorNostring#fff
inputBoxBorderRadiusNostring5px
checkboxBackgroundColorNostring#000
checkboxTextColorNostring#fff
controlBorderRadiusNostring5px
controlBorderColorNostring#d7d7d7
controlBorderActiveColorNostring#000
buttonFontSizeNostring16px
buttonFontWeightNostring400
buttonWidthNostring50%
primaryButtonBackgroundColorNostring#000
primaryButtonTextColorNostring#fff
primaryButtonBorderRadiusNostring5px
primaryButtonBorderColorNostring#000
primaryButtonBorderWidthNostring0px
primaryButtonBorderHoverColorNostring#000
primaryButtonTextHoverColorNostring#fff
primaryButtonBackgroundHoverColorNostring#4d4d4d
primaryButtonTextActiveColorNostring#fff
primaryButtonBackgroundActiveColorNostring#6b6b6b
primaryButtonBorderActiveColorNostring#000
secondaryButtonBackgroundColorNostring#fff
secondaryButtonTextColorNostring#000
secondaryButtonBorderRadiusNostring5px
secondaryButtonBorderColorNostring#000
secondaryButtonBorderWidthNostring0px
secondaryButtonBorderHoverColorNostring#4d4d4d
secondaryButtonTextHoverColorNostring#000
secondaryButtonBackgroundHoverColorNostring#d7d7d7
secondaryButtonTextActiveColorNostring#000
secondaryButtonBackgroundActiveColorNostring#e0e0e0
secondaryButtonBorderActiveColorNostring#6b6b6b
tableHeaderBorderColorNostring#d7d7d7
tableRowBorderColorNostring#e8e8e8
tablePaginatorSelectedColorNostring#d7d7d7
tablePaginatorHoverColorNostring#e8e8e8
tableDeviceInfoColorDefaultNostring#6b6b6b
tableDeviceIconColorDefaultNostring#6b6b6b
tableActionIconHoverColorDefaultNostring#6b6b6b