> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Modal Customization

> Learn how to customize the appearance of the Para modal to match your application's design.

export const Link = ({href, label}) => <a href={href} style={{
  display: "inline-block",
  position: "relative",
  color: "#000000",
  fontWeight: 600,
  cursor: "pointer",
  borderBottom: "none",
  textDecoration: "none"
}} onMouseEnter={e => {
  e.currentTarget.querySelector("#underline").style.height = "2px";
}} onMouseLeave={e => {
  e.currentTarget.querySelector("#underline").style.height = "1px";
}}>
    {label}
    <span id="underline" style={{
  position: "absolute",
  left: 0,
  bottom: 0,
  width: "100%",
  height: "1px",
  borderRadius: "2px",
  background: "linear-gradient(45deg, #FF4E00, #874AE3)",
  transition: "height 0.3s"
}}></span>

  </a>;

export const Card = ({imgUrl, iconUrl, fontAwesomeIcon, title, description, href, horizontal = false}) => {
  return <div className="relative group my-2" style={{
    padding: "1px",
    background: "#e5e7eb",
    borderRadius: "12px"
  }} onMouseOver={e => {
    e.currentTarget.style.background = "linear-gradient(45deg, #FF4E00, #874AE3)";
  }} onMouseOut={e => {
    e.currentTarget.style.background = "#e5e7eb";
  }}>
      <a href={href} className={`
          block not-prose font-normal h-full
          bg-white dark:bg-background-dark 
          overflow-hidden w-full cursor-pointer
          flex ${horizontal ? "flex-row" : "flex-col"}
        `} style={{
    borderRadius: "11px"
  }}>
        {(imgUrl || iconUrl) && <div className={`
              relative overflow-hidden flex-shrink-0
              ${horizontal ? "rounded-l" : ""}
              ${!imgUrl ? "bg-white dark:bg-background-dark p-4" : ""}
            `} style={{
    width: horizontal ? "30%" : "100%"
  }}>
            {imgUrl && <img src={`https://mintlify.s3-us-west-1.amazonaws.com/getpara${imgUrl}`} alt={title} className="w-full h-full object-cover" />}
            {(iconUrl || fontAwesomeIcon) && <div className={`
                ${imgUrl ? "absolute inset-0" : ""}
                flex items-center justify-center
              `}>
                <div className="relative w-8 h-8">
                  <img src={iconUrl ? `https://mintlify.s3-us-west-1.amazonaws.com/getpara${iconUrl}` : fontAwesomeIcon} alt={title} className="w-full h-full object-contain" style={{
    filter: "brightness(0) invert(1)"
  }} />
                </div>
              </div>}
          </div>}
        <div className={`
            flex-grow px-6 py-5
            ${horizontal && (imgUrl || iconUrl) ? "flex flex-col justify-center" : ""}
          `} style={{
    width: horizontal ? "70%" : "100%"
  }}>
          {title && <h2 className="font-semibold text-base text-gray-800 dark:text-white">{title}</h2>}
          {description && <div className={`
              font-normal text-sm text-gray-600 dark:text-gray-400 leading-6
              ${horizontal || !imgUrl && !iconUrl ? "mt-0" : "mt-1"}
            `}>
              <p>{description}</p>
            </div>}
        </div>
      </a>
    </div>;
};

The Para Modal is designed to be easily customizable, allowing you to adapt its appearance to fit your application's
design. UI and theming options are props that can be passed to the `ParaModal` component. These props allow you to
configure the modal's appearance, authentication options, and security features.

<Frame>
  <img src="https://mintcdn.com/getpara/ItjCWUwL47hhaKTT/images/v1/para-customize-callout.png?fit=max&auto=format&n=ItjCWUwL47hhaKTT&q=85&s=1d593d9edb5324f2490e8a089410c6b9" alt="Para Modal Customization" width="3704" height="2596" data-path="images/v1/para-customize-callout.png" />
</Frame>

## Modal Configuration

### Required Props

A few props are required to ensure the modal displays correctly. These include the `appName` and `logo` props, which are
essential for branding and user recognition.

```tsx theme={null}
<ParaModal
  appName="Your App Name"
  logo="https://yourdomain.com/logo.png"
  // ... other props
/>
```

<Tip>For optimal display, use a logo image with dimensions of 372px X 160px.</Tip>

I'll add a section about the `currentStepOverride` prop in the Modal Configuration section, after the Required Props
section. Here's how I would add it:

### Wallet Balance

This prop allow the passing of an RPC URL from which the balance will be fetched and displayed for the selected wallet.

<ParamField body="rpcUrl" type="string">
  Specify the RPL URL where the wallet balance should be fetched from.
</ParamField>

```tsx theme={null}
<ParaModal
  rpcUrl='https://sepolia.drpc.org'
  // ... other props
/>
```

<Note>
  Balance display is currently only available for EVM wallets.
</Note>

### Step Override

The `currentStepOverride` prop allows you to control which step of the modal flow is displayed when the modal opens.
This is useful when you want to skip directly to a specific step rather than starting from the beginning of the flow.

<ParamField body="currentStepOverride" type="ModalStepProp">
  Override the initial step shown in the modal. Accepts either uppercase or lowercase step names.
</ParamField>

```tsx theme={null}
<ParaModal
  currentStepOverride="ACCOUNT_MAIN" // or "account_main"
  // ... other props
/>
```

Available steps include:

<Accordion title="Modal Steps">
  * `AUTH_MAIN` - Main authentication options
  * `AUTH_MORE` - Additional authentication methods
  * `EX_WALLET_MORE` - External wallet options
  * `EX_WALLET_SELECTED` - Selected external wallet
  * `VERIFICATIONS` - Verification steps
  * `BIOMETRIC_CREATION` - Biometric setup
  * `PASSWORD_CREATION` - Password creation
  * `SECRET` - Recovery secret display
  * `ACCOUNT_MAIN` - Main account view
  * `ADD_FUNDS_BUY` - Buy crypto view
  * `ADD_FUNDS_RECEIVE` - Receive crypto view
  * `CHAIN_SWITCH` - Chain selection view

  And many more steps for specific flows like OAuth, 2FA setup, and funds management.
</Accordion>

<Note>
  Setting an invalid step or a step that requires previous steps to be completed may cause unexpected behavior. Ensure
  the step override makes sense in your authentication flow.
</Note>

### Authentication Options

The authentication options allow you to control the authentication methods available to users. You can enable or disable
email and phone login, as well as specify the order of OAuth methods.

<ParamField body="oAuthMethods" type="OAuthMethod[]">
  Specify OAuth methods to display. The order of methods in the array determines their display order in the modal.
</ParamField>

<ParamField body="disableEmailLogin" type="boolean" default="false">
  Disable email login if set to true
</ParamField>

<ParamField body="disablePhoneLogin" type="boolean" default="false">
  Disable phone login if set to true
</ParamField>

```tsx theme={null}
<ParaModal
  oAuthMethods={[OAuthMethod.GOOGLE, OAuthMethod.TWITTER, OAuthMethod.DISCORD]}
  disableEmailLogin={false}
  disablePhoneLogin={true}
  // ... other props
/>
```

### Security Features

Configure additional security steps in the Para modal by setting `twoFactorAuthEnabled` and `recoverySecretStepEnabled`
flags. When enabled, these flags add their respective authentication steps to the modal's UI flow. Two-factor
authentication adds a verification code step, while the recovery secret step allows users to download and store their
account recovery credentials.

<ParamField body="twoFactorAuthEnabled" type="boolean" default="false">
  Enable two-factor authentication steps
</ParamField>

<ParamField body="recoverySecretStepEnabled" type="boolean" default="false">
  Show wallet recovery option to users
</ParamField>

```tsx theme={null}
<ParaModal
  twoFactorAuthEnabled={true}
  recoverySecretStepEnabled={true}
  // ... other props
/>
```

### External Wallets

This prop allows you to specify which external wallets are supported for login. The order of wallets in the array
determines their display order in the modal.

<ParamField body="externalWallets" type="TExternalWallet[]">
  Specify external wallets to support. The order of wallets in the array determines their display order.
</ParamField>

```tsx theme={null}
<ParaModal
  externalWallets={[ExternalWallet.METAMASK, ExternalWallet.PHANTOM]}
  // ... other props
/>
```

<Note>
  For more details on external wallet integration in the Para modal, refer to the <Link label="External Wallets" href="/v1/web/guides/external-wallets/overview" />
</Note>

### Auth Layout

The `authLayout` prop can expand or collapse the view of OAuth methods and external wallets. Only one of `Auth:` or
`External:` can be passed into the array, either `CONDENSED` or `FULL` UI versions of each. The order of the array
determines the order that the components will be displayed in the modal.

<ParamField body="authLayout" type="TAuthLayout[]" default="[AuthLayout.AUTH_FULL, AuthLayout.EXTERNAL_FULL]">
  Configure the layout of auth components
</ParamField>

```tsx theme={null}
<ParaModal
  authLayout={[AuthLayout.AUTH_CONDENSED, AuthLayout.EXTERNAL_FULL]}
  // ... other props
/>
```

<Tip>
  Use our <Link label="Modal Designer" href="https://demo.getpara.com/" /> to visualize different layout configurations before implementing them in your project.
</Tip>

## Theming

You can customize the overall look of the Para modal by providing a theme object with the following properties all of
which are optional:

```typescript theme={null}
interface ParaTheme {
  foregroundColor?: string; // Primary text and icon color
  backgroundColor?: string; // Background color of the modal
  accentColor?: string; // Color for interactive elements and highlights
  darkForegroundColor?: string; // Foreground color for dark mode
  darkBackgroundColor?: string; // Background color for dark mode
  darkAccentColor?: string; // Accent color for dark mode
  mode?: "light" | "dark"; // Set the overall theme mode
  borderRadius?: BorderRadius; // Set the border radius for UI elements
  font?: string; // Specify the font family to use
}
```

<Warning>
  It's crucial to set the `mode` correctly based on your background color to ensure all components remain visible.
</Warning>

An example of a basic theme object is as follows:

```tsx theme={null}
<ParaModal
  theme={{
    foregroundColor: "#333333",
    backgroundColor: "#FFFFFF",
    accentColor: "#007AFF",
    mode: "light",
    borderRadius: "md",
    font: "Arial, sans-serif",
  }}
  // ... other props
/>
```

<Tip>
  You can use custom fonts by importing them in your global CSS and specifying the font face in the `font` variable of
  the theme.
</Tip>

### Advanced Theme Customization

The para modal also offers more granular control over specific UI elements through the `customPalette` property. This
allows you to define colors for various components, ensuring that the modal aligns perfectly with your application's
design language.

```tsx theme={null}
<ParaModal
  theme={{
    // ... basic theme properties
    customPalette: {
      text: {
        primary: "#333333",
        secondary: "#666666",
        subtle: "#999999",
        inverted: "#FFFFFF",
        error: "#FF3B30",
      },
      modal: {
        surface: {
          main: "#FFFFFF",
          footer: "#F2F2F7",
        },
        border: "#E5E5EA",
      },
      // ... other customPalette properties
    },
  }}
/>
```

By leveraging these theming options, you can ensure that the Para modal seamlessly integrates with your application's
design language, providing a cohesive user experience.

## Examples

To see what all of these props look like in practice, check out our live demo:

<Card horizontal title="Modal Designer" imgUrl="/images/v1/general-customize.png" href="https://demo.getpara.com/" description="View a live demo of the Para External Wallets Modal in action." />

For an example code implementation of Para Modal with all the props mentioned in this guide, check out our GitHub
repository:

<Card horizontal title="GitHub Repository" imgUrl="/images/v1/general-examples.png" href="https://github.com/getpara/examples-hub/tree/main/web" description="Para integration examples for web applications." />

## Next Steps

Now that you have customized the Para modal to fit your application's design, you can explore other features and
integrations to enhance your Para experience. Here are some resources to help you get started:

### Ecosystems

Learn how to use Para with popular Web3 clients and wallet connectors. We'll cover integration with key libraries for
EVM, Solana, and Cosmos ecosystems.

<CardGroup cols={3}>
  <Card title="EVM Integration" imgUrl="/images/v1/network-evm.png" href="/v1/web/guides/evm" description="Learn how to use Para with EVM-compatible libraries like ethers.js, viem, and wagmi." />

  <Card title="Solana Integration" imgUrl="/images/v1/network-solana.png" href="/v1/web/guides/solana" description="Discover how to integrate Para with solana-web3.js or Anchor framework for Solana applications." />

  <Card title="Cosmos Integration" imgUrl="/images/v1/network-cosmos.png" href="/v1/web/guides/cosmos" description="Explore Para integration with Cosmos ecosystem using CosmJS, Cosmos Kit, and Graz connectors." />
</CardGroup>
