This package contains ready-made, customizable React UI components that wrap the CDP frontend SDK.

Components

Quickstart

This guide will help you get started with @coinbase/cdp-react. You’ll learn how to install the package, set up the provider, and render your first component.

Installation

First, add the package to your project using your preferred package manager.
# With pnpm
pnpm add @coinbase/cdp-react @coinbase/cdp-core @coinbase/cdp-hooks

# With yarn
yarn add @coinbase/cdp-react @coinbase/cdp-core @coinbase/cdp-hooks

# With npm
npm install @coinbase/cdp-react @coinbase/cdp-core @coinbase/cdp-hooks

Gather your CDP Project information

  1. Sign in or create an account on the CDP Portal
  2. On your dashboard, select a project from the dropdown at the at the top, and copy the Project ID

Allowlist your local app

  1. Navigate to the Embedded Wallet Configuration in CDP Portal, and click Add origin to include your local app
  2. Enter the origin of your locally running app - e.g., http://localhost:3000
  3. Click Add origin again to save your changes

Setup Provider

Next, you need to wrap your application with the CDPReactProvider. CDPReactProvider provides the necessary context for hooks and components to work correctly. It also provides access to config data and theming. Update your main application file (e.g., main.tsx or App.tsx) to include the provider:
import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './App'; // Your main App component
import { CDPReactProvider, type Theme } from '@coinbase/cdp-react';

// Your CDP config
const cdpConfig = {
  projectId: "your-project-id", // Copy your Project ID here.
}

// Global config for your dapp
const appConfig = {
  name: "My app", // the name of your application
  logoUrl: "https://picsum.photos/64", // logo will be displayed in select components
}

// You can customize the theme by overriding theme variables
const themeOverrides: Partial<Theme> = {
  "colors-bg-default": "black",
  "colors-bg-alternate": "#121212",
  "colors-fg-default": "white",
  "colors-fg-muted": "#999999",
}

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <App />
    </CDPReactProvider>
  </React.StrictMode>,
);

Render a Component

Now you can use the components from the library. Let’s add the AuthButton component to your application. This component handles both sign-in and sign-out functionality.
// In your App.tsx or any other component
import { AuthButton } from '@coinbase/cdp-react/components/AuthButton';

function App() {
  return (
    <div>
      <h1>Welcome</h1>
      <AuthButton />
    </div>
  );
}

export default App;

That’s it! You’ve successfully installed @coinbase/cdp-react, set up the provider, and rendered your first component.

Functions

CDPReactProvider()

function CDPReactProvider(props): Element;
CDPReactProvider component.

Parameters

ParameterTypeDescription
propsCDPReactProviderPropsProps for the CDPReactProvider component

Returns

Element The CDPReactProvider component

Example

function App() {
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <YourApp />
    </CDPReactProvider>
  );
}

useAppConfig()

function useAppConfig(): AppConfig;
Hook to access the app config from a component.

Returns

AppConfig The app config.

Example

const MyComponent = () => {
  // Access the app config from a child component
  const appConfig = useAppConfig();
  return <div>{appConfig.name}</div>;
}

function App() {
  return (
    <CDPReactProvider config={CDP_CONFIG} app={appConfig}>
      <MyComponent />
    </CDPReactProvider>
  );
}

AuthButton()

function AuthButton(props): Element;
A button that signs the user in or out. This component will render the SignInModal component when the user is signed out, and a SignOutButton when the user is signed in. If the SDK is initializing (i.e. the initial user state is pending), the component will render a loading skeleton.

Parameters

ParameterTypeDescription
propsAuthButtonProps & HTMLAttributes<HTMLDivElement>The props for the component.

Returns

Element The rendered component.

Example

function App() {
  // Render the AuthButton component
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <AuthButton />
    </CDPReactProvider>
  );
}

SendTransactionButton()

function SendTransactionButton(props): Element;
A button that signs and sends a transaction.

Parameters

ParameterTypeDescription
propsSendTransactionButtonPropsThe props for the SendTransactionButton component.

Returns

Element The rendered component.

SignIn()

function SignIn(props): Element;
A sign-in component that handles the email and OTP flow.

Parameters

ParameterTypeDescription
propsSignInPropsThe props for the component.

Returns

Element The SignIn component.

Examples

function App() {
  // Render the SignIn component with a custom onSuccess handler
  const handleSuccess = () => {
    console.log("Sign in successful");
  }
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn onSuccess={handleSuccess} />
    </CDPReactProvider>
  );
}
function App() {
  // Render the title, description, and auth method buttons inside the transition containers
  // This is the default UI if no children are provided.
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage />
        <SignInForm>
          {({ authMethod, step, Form }) => {
            // Pass the authMethod and step from the render function args to the title
            // and description components so the UI is rendered correctly when both states
            // are visible during the transition
            return (
              <>
                <SignInTitle step={step} authMethod={authMethod} />
                <SignInDescription step={step} authMethod={authMethod} />
                {Form}
                {state.step === "credentials" && <SignInAuthMethodButtons activeMethod={authMethod} />}
              </>
            );
          }}
        </SignInForm>
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}
function App() {
  // Render a page title based on the current step
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        {(state) => {
           return (
             <>
               <SignInBackButton />
               <SignInImage />
               <h1>
                 {state.step === "credentials" && "Welcome"}
                 {state.step === "verification" && "Almost there"}
               </h1>
               <SignInTitle />
               <SignInDescription />
               <SignInForm />
               {state.step === "credentials" && <SignInAuthMethodButtons activeMethod={state.authMethod} />}
               <SignInFooter />
             </>
           );
         }}
      </SignIn>
    </CDPReactProvider>
  );
}

useSignInReducer()

function useSignInReducer(initialState): [SignInState, ActionDispatch<[SignInAction]>];
A reducer hook for the SignIn component.

Parameters

ParameterTypeDescription
initialStateSignInStateThe initial state of the component.

Returns

[SignInState, ActionDispatch<[SignInAction]>] The current state and dispatcher to perform actions on the state.

SignOutButton()

function SignOutButton(props?): Element;
A button that signs the user out.

Parameters

ParameterTypeDescription
props?SignOutButtonPropsThe props for the component.

Returns

Element The rendered component.

SignInModal()

function SignInModal(props): Element;
A sign-in modal component that wraps the SignIn component. In the SignIn modal, the description is hidden on the “credentials” step, and the title is hidden on the “verification” step.

Parameters

ParameterTypeDescription
propsSignInModalPropsThe props for the SignInModal component.

Returns

Element The SignInModalcomponent.

Examples

function App() {
  // Render the SignInModal component
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignInModal />
    </CDPReactProvider>
  );
}
function App() {
  // Render the SignInModal component with a custom trigger button
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignInModal>
        <button className="sign-in-button">
          Sign in with email
        </button>
      </SignInModal>
    </CDPReactProvider>
  );
}

ThemeProvider()

function ThemeProvider(props): Element;
Provides the theme to its child components and injects CSS variables.

Parameters

ParameterTypeDescription
propsThemeProviderPropsThe props for the component.

Returns

Element The theme provider component.

Example

const AuthBasedTheme = ({ children }: { children: React.ReactNode }) => {
  const { isSignedIn: signedIn } = useIsSignedIn();
  const { evmAddress: cdpEvmAddress } = useEvmAddress();
  const isAuthenticated = signedIn && cdpEvmAddress;
  const theme = useMemo(() => (isAuthenticated ? darkTheme : {}), [isAuthenticated]);
  return (
    <ThemeProvider theme={theme}>
      {children}
    </ThemeProvider>
  );
};

function App() {
  // Change the theme based on the user's authentication status
  return (
    <CDPHooksProvider config={cdpConfig}>
      <AuthBasedTheme>
        <YourApp />
      </AuthBasedTheme>
    </CDPHooksProvider>
  );
}

useTheme()

function useTheme(): ThemeContextValue;
Hook to access the theme from a component.

Returns

ThemeContextValue The theme.

Example

function App() {
  // Style a paragraph with the secondary text color
  const { theme } = useTheme();
  return <p style={{ color: theme["colors-fg-muted"] }}>Secondary text</p>;
}

flattenTokensObject()

function flattenTokensObject<T>(tokensObject, cssVarPrefix?): Flattened<T>;
Flattens a nested theme object into a single-level object with CSS variable representations.

Type Parameters

Type Parameter
T extends NestedTokenObject

Parameters

ParameterTypeDefault valueDescription
tokensObjectTundefinedThe nested tokens object to flatten.
cssVarPrefix?string"cdp-web"An optional prefix for the generated CSS variables.

Returns

Flattened<T> A flattened theme object.

themeToCssVariables()

function themeToCssVariables(theme): CDPWebCSSVariables;
Converts a theme object to a CSS variables object for the CDP web component library.

Parameters

ParameterTypeDescription
themeRecord<string, string>The theme object to convert.

Returns

CDPWebCSSVariables A CSS variables object.

Example

const themeOverrides: Partial<Theme> = {
  "color-bg-primary": "red",
};

// { "--cdp-web-color-bg-primary": "red" }
const cssVariables = themeToCssVariables(themeOverrides);

***

### IconArrowLeft()

```ts
function IconArrowLeft(props): Element;
Arrow Left icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Arrow Left icon.

Example

// Icon is correctly hidden from screen readers
<p>
  <IconArrowLeft />
  Back
</p>

// Icon with screen-reader accessible label only
<p>
  <IconArrowLeft aria-label="Back" />
</p>

IconArrowsUpDown()

function IconArrowsUpDown(props): Element;
Arrows Up/Down icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Arrow Left icon.

Example

// Icon is correctly hidden from screen readers
<p>
  <IconArrowsUpDown />
  Swap
</p>

// Icon with screen-reader accessible label only
<p>
  <IconArrowsUpDown aria-label="Swap" />
</p>

IconCheck()

function IconCheck(props): Element;
Check Circle icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Check Circle icon.

Example

// Icon is correctly from screen readers
<p>
  <IconCheck />
  Success!
</p>

// Icon with screen-reader accessible label only
<p>
  <IconCheck aria-label="Success" />
</p>

IconCheckCircle()

function IconCheckCircle(props): Element;
Check Circle icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Check Circle icon.

Example

// Icon is correctly from screen readers
<p>
  <IconCheckCircle />
  Success!
</p>

// Icon with screen-reader accessible label only
<p>
  <IconCheckCircle aria-label="Success" />
</p>

IconChevronDown()

function IconChevronDown(props): Element;
Chevron down icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The chevron down icon.

Example

// Icon is correctly hidden from screen readers
<p>
  <IconChevronDown />
  Expand
</p>

// Icon with screen-reader accessible label only
<p>
  <IconChevronDown aria-label="Expand" />
</p>

IconEnvelope()

function IconEnvelope(props): Element;
Envelope icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Envelope icon.

Example

// Icon is correctly from screen readers
<p>
  <IconEnvelope />
  Email me a code
</p>

// Icon with screen-reader accessible label only
<p>
  <IconEnvelope aria-label="Email me a code" />
</p>

IconExclamationCircle()

function IconExclamationCircle(props): Element;
Exclamation Circle icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Exclamation Circle icon.

Example

// Icon is correctly from screen readers
<p>
  <IconExclamationCircle />
  Warning!
</p>

// Icon with screen-reader accessible label only
<p>
  <IconExclamationCircle aria-label="Warning" />
</p>

IconExclamationTriangle()

function IconExclamationTriangle(props): Element;
Exclamation Triangle icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Exclamation Triangle icon.

Example

// Icon is correctly hidden from screen readers
<p>
  <IconExclamationTriangle />
  Warning!
</p>

// Icon with screen-reader accessible label only
<p>
  <IconExclamationTriangle aria-label="Warning" />
</p>

IconLock()

function IconLock(props): Element;
Lock icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Lock icon.

Example

// Icon is correctly from screen readers
<p>
  <IconLock />
  Locked
</p>

// Icon with screen-reader accessible label only
<p>
  <IconLock aria-label="locked" />
</p>

IconPhone()

function IconPhone(props): Element;
Phone icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The chat bubble icon.

Example

// Icon is correctly from screen readers
<p>
  <IconPhone />
  Text me a code
</p>

// Icon with screen-reader accessible label only
<p>
  <IconPhone aria-label="Text me a code" />
</p>

IconXMark()

function IconXMark(props): Element;
Close icon component.

Parameters

ParameterTypeDescription
propsOmit<SVGProps<SVGSVGElement>, "viewBox">The props for the icon.

Returns

Element The Close icon.

Example

// Icon is correctly from screen readers
<p>
  <IconXMark />
  Close
</p>

// Icon with screen-reader accessible label only
<p>
  <IconXMark aria-label="Close" />
</p>

clamp()

function clamp(
   value, 
   min, 
   max): number;
Clamp a value between a minimum and maximum value.

Parameters

ParameterTypeDescription
valuenumberThe value to clamp.
minnumberThe minimum value.
maxnumberThe maximum value.

Returns

number The clamped value.

getMessageFromUnknownError()

function getMessageFromUnknownError(error, defaultMesasge?): string;
Get a message from an unknown error with a fallback in case one is not found.

Parameters

ParameterTypeDefault valueDescription
errorunknownundefinedThe error to get a message from.
defaultMesasge?string"Something went wrong"The default message to return if no message is found.

Returns

string The message from the error.

isApiError()

function isApiError(error): error is APIError;
Type guard to check if the error is an API error.

Parameters

ParameterTypeDescription
errorunknownThe error to check.

Returns

error is APIError
  • True if the error is an API error, false otherwise.

Example

try {
  ...
}
catch (error) {
  if (isApiError(error)) {
    // Handle API error
    console.log(error.errorMessage);
  }
}

isEmailInvalid()

function isEmailInvalid(value): boolean;
Check if an email address is invalid.

Parameters

ParameterTypeDescription
valuestringThe email address to validate.

Returns

boolean true if the email address is invalid, false otherwise.

Example

if (isEmailInvalid("test@example")) {
  console.log("Invalid email address");
}

parseValuesFromPhoneNumber()

function parseValuesFromPhoneNumber(phoneNumber, countryCode?): PhoneNumber;
Parse a phone number into a phone number object.

Parameters

ParameterTypeDescription
phoneNumberstringThe phone number to parse.
countryCode?CountryCodeThe country code to parse the phone number for.

Returns

PhoneNumber A phone number object.

Fund()

function Fund(props): Element;
The Fund component.

Parameters

ParameterTypeDescription
propsFundPropsThe props of the Fund component.

Returns

Element The Fund component.

Examples

// Basic usage
const App = () => {
  const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
    // call the buy quote API
  }
  const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
    // call the buy options API
  }
  return (
    <Fund
      country="US"
      subdivision="NY"
      cryptoCurrency="eth"
      fiatCurrency="usd"
      fetchBuyQuote={fetchBuyQuote}
      fetchBuyOptions={fetchBuyOptions}
      network="base"
      presetAmountInputs={[10, 25, 50]}
    />
  )
}
// Example customizing the children to render the title as a page title
// and add a custom error message
const App = () => {
  const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
    // call the buy quote API
  }
  const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
    // call the buy options API
  }
  const title = "Buy ETH";
  const titleId = useId();
  const submitLabel = "Purchase now";
  return (
    <Fund
      country="US"
      subdivision="NY"
      cryptoCurrency="eth"
      fiatCurrency="usd"
      fetchBuyQuote={fetchBuyQuote}
      fetchBuyOptions={fetchBuyOptions}
      network="base"
      presetAmountInputs={[10, 25, 50]}
      submitLabel={submitLabel}
      title={title}
    >
      <FundTitle as="h1" id={titleId}>{title}</FundTitle>
      <FundForm aria-labelledby={titleId} submitLabel={submitLabel}>
        {({ view, Content }) => (
          <>
            {Content}
            {view === "error" && <p>Contact support at support@example.com</p>}
          </>
        )}
      </FundForm>
      <FundFooter />
    </Fund>
  )
}

FundFooter()

function FundFooter(props): Element;
The FundFooter component.

Parameters

ParameterTypeDescription
propsHTMLAttributes<HTMLDivElement>The props of the FundFooter component.

Returns

Element The FundFooter component.

FundForm()

function FundForm(props): Element;
The FundForm component is a form that allows the user to fund their wallet.

Parameters

ParameterTypeDescription
propsFundFormPropsThe props for the FundForm component.

Returns

Element The FundForm component.

FundTitle()

function FundTitle(props): Element;
The FundTitle component is a component that displays the title of the Fund component.

Parameters

ParameterTypeDescription
propsFundTitlePropsThe props for the FundTitle component.

Returns

Element The FundTitle component.

useFundContext()

function useFundContext(): FundContextType;
Get the value of the FundContext.

Returns

FundContextType
  • The value of the FundContext.

FundModal()

function FundModal(props): Element;
A fund modal component that wraps the Fund component.

Parameters

ParameterTypeDescription
propsFundModalPropsThe props for the FundModal component.

Returns

Element The FundModal component.

Examples

function App() {
  // Render the FundModal component
  const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
    // call the buy quote API
  }
  const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
    // call the buy options API
  }
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <FundModal
        country="US"
        subdivision="NY"
        cryptoCurrency="eth"
        fiatCurrency="usd"
        fetchBuyQuote={fetchBuyQuote}
        fetchBuyOptions={fetchBuyOptions}
        network="base"
        presetAmountInputs={[10, 25, 50]}
      />
    </CDPReactProvider>
  );
}
function App() {
  // Render the FundModal component with a custom trigger button
  const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
    // call the buy quote API
  }
  const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
    // call the buy options API
  }
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <FundModal
        country="US"
        subdivision="NY"
        cryptoCurrency="eth"
        fiatCurrency="usd"
        fetchBuyQuote={fetchBuyQuote}
        fetchBuyOptions={fetchBuyOptions}
        network="base"
        presetAmountInputs={[10, 25, 50]}
      >
        <button className="fund-button">
          Get ETH
        </button>
      </FundModal>
    </CDPReactProvider>
  );
}

SignInAuthMethodButtons()

function SignInAuthMethodButtons(props): null | Element;
The AuthMethodButtons component.

Parameters

ParameterTypeDescription
propsSignInAuthMethodButtonsPropsThe props for the AuthMethodButtons component.

Returns

null | Element The AuthMethodButtons component.

SignInBackButton()

function SignInBackButton(props): null | Element;
A button to go back to the previous step of the sign-in flow.

Parameters

ParameterTypeDescription
propsSignInBackButtonPropsThe props for the component.

Returns

null | Element The sign-in back button.

Example

function App() {
  // Customize the back button icon and label
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton aria-label="go back">
          <MyCustomIcon />
        </SignInBackButton>
        <SignInImage />
        <SignInTitle />
        <SignInDescription />
        <SignInForm />
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}

SignInDescription()

function SignInDescription(props): Element;
A description for the SignIn component.

Parameters

ParameterTypeDescription
propsSignInDescriptionPropsThe props for the component.

Returns

Element The rendered component.

Example

function App() {
  // Render a custom description in the SignIn component
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage />
        <SignInTitle />
        <SignInDescription>
          Custom Sign In Description
        </SignInDescription>
        <SignInForm />
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}

SignInFooter()

function SignInFooter(props): Element;
A footer component for the sign-in flow.

Parameters

ParameterTypeDescription
propsHTMLAttributes<HTMLDivElement>The props for the component.

Returns

Element The sign-in footer.

Example

function App() {
  // Add class to the footer
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage />
        <SignInTitle />
        <SignInDescription />
        <SignInForm />
        <SignInFooter className="sign-in-footer" />
      </SignIn>
    </CDPReactProvider>
  );
}

SignInForm()

function SignInForm(props): Element;
The form for the SignIn component.

Parameters

ParameterTypeDescription
propsSignInFormPropsThe component props.

Returns

Element The rendered component.

Example

function App() {
  // Add div wrapper and class to the form
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage />
        <SignInTitle />
        <SignInDescription />
        <div className="sign-in-form-wrapper">
          <SignInForm className="sign-in-form" />
        </div>
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}

SignInImage()

function SignInImage(props): null | Element;
A logo or success icon for the SignIn component.

Parameters

ParameterTypeDescription
propsSignInImagePropsThe props for the component.

Returns

null | Element The rendered component.

Example

function App() {
  // Use a different image from your app logo in the SignIn component
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage src="https://example.com/image.png" alt="Example Image" />
        <SignInTitle />
        <SignInDescription />
        <SignInForm />
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}

SignInTitle()

function SignInTitle(props): Element;
A title for the SignIn component.

Parameters

ParameterTypeDescription
propsSignInTitlePropsThe props for the component.

Returns

Element The rendered component.

Example

function App() {
  // Render a custom title in the SignIn component
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInBackButton />
        <SignInImage />
        <SignInTitle>
          Custom Sign In Title
        </SignInTitle>
        <SignInDescription />
        <SignInForm />
        <SignInFooter />
      </SignIn>
    </CDPReactProvider>
  );
}

useSignInContext()

function useSignInContext(): object;
A context for the SignIn component.

Returns

object The current state of the SignIn component.
state
state: SignInState;
dispatch
dispatch: Dispatch<SignInAction>;

Example

function EmailComponent() {
  const { state } = useSignInContext();
  return <div>Submitted email: {state.email}</div>;
}

function App() {
  return (
    <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <SignIn>
        <SignInTitle />
        <SignInDescription />
        <EmailComponent />
        <SignInForm />
      </SignIn>
    </CDPReactProvider>
  );

## Interfaces

### AppConfig

Optional app config to add branding

#### Example

```tsx lines
const appConfig: AppConfig = {
  name: "My App",
  logoUrl: "https://placehold.co/64",
};

Properties

PropertyTypeDescription
namestringThe name of the app.
logoUrl?stringThe URL of the app logo. This should be at least 64 by 64px and must start with http or https.
showCoinbaseFooter?booleanWhether to show the “secured by Coinbase” footer. Defaults to true.
authMethods?("email" | "sms")[]Authentication methods to allow for the user. Defaults to ["email"].

CDPReactProviderProps

CDPReactProviderProps

Properties

PropertyTypeDescription
app?AppConfigThe app config
childrenReactNodeThe children of the component
configConfigThe CDP configuration
className?string-
style?CSSProperties-
theme?Partial<Theme>The theme values to override

AuthButtonProps

The props for the AuthButton component.

Properties

PropertyTypeDescription
closeOnSuccessDelay?null | numberThe delay in milliseconds before the sign in modal is closed and the sign out button is shown after the sign in is successful. If null, the sign in modal will not be closed automatically. If 0, the sign in modal will be closed immediately.
onSignInSuccess?() => voidA function to call when the sign in is successful.
onSignInSuccessTransitionEnd?() => voidA function to call after the sign in success, when the dialog close transition ends.
onSignOutSuccess?() => voidA function to call when the sign out is successful.

SendTransactionButtonProps

The props for the SendTransactionButton component. SendTransactionButtonProps

Extends

  • Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onError">

Properties

PropertyTypeDescription
account`0x${string}`The account to send the transaction from.
networkSendEvmTransactionWithEndUserAccountBodyNetworkThe network to send the transaction on.
onError?(error) => voidA function to call when the transaction errors.
onSuccess?(hash) => voidA function to call when the transaction is successful.
pendingLabel?ReactNodeThe label to show to screen readers when the transaction is pending.
transactionAllowedEvmTransactionTypeThe transaction to send.
variant?ButtonVariantThe variant of the button.

SignInProps

Props for the SignIn component

Properties

PropertyTypeDescription
children?ReactNode | (state) => ReactNodeThe children of the component. Leave empty to use the default sign-in flow UI. If a function is provided, it will be called with the current state of the sign-in flow. The function should return a ReactNode. Example lines <SignIn> {(state) => { // Render a page title based on the current step return ( <> <SignInBackButton /> <SignInImage /> <h1> {state.step === "credentials" && "Welcome"} {state.step === "verification" && "Almost there"} </h1> <SignInTitle /> <SignInDescription /> <SignInForm /> {state.step === "credentials" && <SignInAuthMethodButtons activeMethod={state.authMethod} />} <SignInFooter /> </> ); }} </SignIn>
className?stringThe class name to apply to the component.
onSuccess?() => voidA function to call when the sign-in flow is successful.

SignInModalProps

Props for the SignInModal component.

Properties

PropertyTypeDescription
children?ReactNodeThe children to render inside the modal.
open?booleanWhether the modal is open. Note: if you set this, you must also set setIsOpen.
setIsOpen?(value) => voidA function to set the modal’s open state. Note: if you set this, you must also set open.
onSuccess?() => voidA function to call when the sign-in flow is successful.

ThemeContextValue

The value of the theme context.

Properties

PropertyType
themeTheme
cssVariablesCDPWebCSSVariables

PhoneNumber

A phone number object.

Properties

PropertyTypeDescription
valuestringThe phone number in the national format (country calling code is not included)
e164stringThe phone number in international format (E.164). Typically used in API calls.

FetchBuyUrlParams

The params for the fetchBuyUrl function.

Properties

PropertyType
paymentMethodstring
paymentAmountnumber

FundFormProps

The props for the FundForm component.

Extends

  • Omit<FormHTMLAttributes<HTMLFormElement>, "children">

Properties

PropertyType
children?(params) => ReactNode
openIn?"tab" | "popup"
submitLabel?ReactNode
onPopupOpen?(popup) => void
onPopupClose?() => void
unmountOnTransactionError?boolean
unmountOnTransactionSuccess?boolean
unmount?() => void

FundPaymentMethod

A payment method for the fund component.

Properties

PropertyType
idstring
namestring
descriptionstring
iconReactNode
minAmount?number
maxAmount?number

FundProps

All the props for the Fund component.

Extends

Extended by

Properties

PropertyTypeInherited from
children?ReactNode | (state) => ReactNode-
className?string-
fetchBuyOptionsFetchBuyOptions-
fetchBuyQuoteFetchBuyQuote-
inputType?InputType-
openIn?"tab" | "popup"-
submitLabel?ReactNode-
title?ReactNode-
countrystringFundStateProps.country
locale?stringFundStateProps.locale
cryptoDecimalPlaces?numberFundStateProps.cryptoDecimalPlaces
cryptoCurrencystringFundStateProps.cryptoCurrency
fiatCurrencystringFundStateProps.fiatCurrency
fiatDecimalPlaces?numberFundStateProps.fiatDecimalPlaces
networkstringFundStateProps.network
presetAmountInputs?FundPresetAmountInputsFundStateProps.presetAmountInputs
subdivision?stringFundStateProps.subdivision
onError?(e) => voidFundLifecycleEvents.onError
onStatus?(lifecycleStatus) => voidFundLifecycleEvents.onStatus
onSuccess?(result?) => voidFundLifecycleEvents.onSuccess

FundState

The state of the Fund component.

Properties

PropertyType
countrystring
cryptoAmount?number
cryptoCurrencystring
cryptoDecimalPlaces?number
exchangeRate?number
exchangeRateError?| null | FundStateError
isExchangeRatePending?boolean
isPaymentMethodsPending?boolean
fiatAmount?number
fiatCurrencystring
fiatDecimalPlaces?number
locale?string
networkstring
paymentMethods?FundPaymentMethod[]
paymentMethodsError?| null | FundStateError
presetAmountInputs?FundPresetAmountInputs
selectedInputTypeInputType
selectedPaymentMethod?FundPaymentMethod
subdivision?string
transactionStatusFundLifecycleStatus

FundTitleProps

The props for the FundTitle component.

Extends

  • HTMLAttributes<HTMLDivElement>

Properties

PropertyType
as?ElementType

OnrampError

An error that occurred during the onramp process.

Properties

PropertyType
errorType"internal_error" | "handled_error" | "network_error" | "unknown_error"
code?string
debugMessage?string

FundModalProps

All the props for the Fund component.

Extends

Properties

PropertyTypeDescriptionOverridesInherited from
children?ReactNodeThe children to render inside the modal.FundProps.children-
open?booleanWhether the modal is open. Note: if you set this, you must also set setIsOpen.--
setIsOpen?(value) => voidA function to set the modal’s open state. Note: if you set this, you must also set open.--
className?string--FundProps.className
fetchBuyOptionsFetchBuyOptions--FundProps.fetchBuyOptions
fetchBuyQuoteFetchBuyQuote--FundProps.fetchBuyQuote
inputType?InputType--FundProps.inputType
openIn?"tab" | "popup"--FundProps.openIn
submitLabel?ReactNode--FundProps.submitLabel
title?ReactNode--FundProps.title
countrystring--FundProps.country
locale?string--FundProps.locale
cryptoDecimalPlaces?number--FundProps.cryptoDecimalPlaces
cryptoCurrencystring--FundProps.cryptoCurrency
fiatCurrencystring--FundProps.fiatCurrency
fiatDecimalPlaces?number--FundProps.fiatDecimalPlaces
networkstring--FundProps.network
presetAmountInputs?FundPresetAmountInputs--FundProps.presetAmountInputs
subdivision?string--FundProps.subdivision
onError?(e) => void--FundProps.onError
onStatus?(lifecycleStatus) => void--FundProps.onStatus
onSuccess?(result?) => void--FundProps.onSuccess

SignInAuthMethodButtonsProps

The props for the AuthMethodButtons component.

Properties

PropertyTypeDescription
activeMethod?"email" | "sms"The active auth method.

SignInBackButtonProps

A button to go back to the previous step of the sign-in flow.

Extends

  • HTMLAttributes<HTMLButtonElement>

Properties

PropertyTypeDescription
step?"credentials" | "verification"If set, will render the back button for this step of the sign in flow, regardless of the context value.
size?ButtonSizeThe size of the button.
variant?ButtonVariantThe variant of the button.

SignInDescriptionProps

The props for the SignInDescription component.

Extends

  • SignInTitleAndDescriptionProps.HTMLAttributes<HTMLElement>

Properties

PropertyTypeDescriptionInherited from
as?ElementTypeThe element type to render the description as.-
authMethod?"email" | "sms"The auth method to render the title for.SignInTitleAndDescriptionProps.authMethod
step?"credentials" | "verification"If set, will render the title for this step of the sign in flow, regardless of the context value.SignInTitleAndDescriptionProps.step

SignInFormProps

Props for the SignInForm component.

Extends

  • Omit<HTMLAttributes<HTMLElement>, "children">

Properties

PropertyTypeDescription
as?ElementTypeThe element type to render the form as.
onSuccess?() => voidThe function to call when the sign in is successful.
step?"credentials" | "verification"If set, will render the form for this step of the sign in flow, regardless of the context value.
children?(props) => ReactNodeThe children of the component.

SignInImageProps

Props for the SignInImage component.

Properties

PropertyTypeDescription
className?stringThe class name to apply to the component.
alt?stringThe alt text for the image.
src?stringThe source URL for the image. Uses the app logo by default.

SignInTitleProps

The props for the SignInTitle component.

Extends

  • SignInTitleAndDescriptionProps.HTMLAttributes<HTMLElement>

Properties

PropertyTypeDescriptionInherited from
as?ElementTypeThe element type to render the title as.-
authMethod?"email" | "sms"The auth method to render the title for.SignInTitleAndDescriptionProps.authMethod
step?"credentials" | "verification"If set, will render the title for this step of the sign in flow, regardless of the context value.SignInTitleAndDescriptionProps.step

SignInState

The state of the SignIn component.

Properties

PropertyTypeDescription
authMethod"email" | "sms"The auth method selected by the user.
canResetOTPbooleanWhether the user can request a new OTP.
emailstringThe email address of the user.
error| null | string | APIErrorThe error message or APIError object.
flowIdstringThe flow ID of the current sign-in flow.
isPendingbooleanWhether the form state is pending.
isSuccessbooleanWhether the sign-in flow is successful.
otpstringThe OTP code entered by the user.
phoneNumberstringThe phone number of the user.
step"credentials" | "verification"The current step of the sign-in flow.

Type Aliases

AuthMethod

type AuthMethod = typeof AUTH_METHODS[number];
The auth method type.

SignOutButtonProps

type SignOutButtonProps = object;
Props for the SignOutButton component.

Param

The children to render inside the button.

Param

A function to call when the sign-out is successful.

Param

The variant of the button.

Properties

PropertyType
children?ReactNode
onSuccess?() => void
variant?ButtonVariant

ThemeProviderProps

type ThemeProviderProps = object;
Props for the ThemeProvider component.

Properties

PropertyType
childrenReactNode
className?string
style?CSSProperties
theme?Partial<Theme>

SemanticColors

type SemanticColors = Flattened<{
  colors: typeof colorsSemantic;
}>;
Semantic colors are the base colors for the theme. They are typically not used directly in the components, but are used to define the base colors for the components.

Example

const theme: Partial<SemanticColors> = {
  "colors-bg-default": "#ffffff",
  "colors-bg-alternate": "#eef0f3",
  "colors-bg-overlay": "color(from var(--cdp-web-colors-bg-alternate) srgb r g b / 0.33)",
};

See


ComponentColors

type ComponentColors = Flattened<{
  colors: typeof colorsComponents;
}>;
Component colors are the colors for the individual UI components. They inherit values from the SemanticColors via CSS variables.

Example

const theme: Partial<ComponentColors> = {
  "colors-cta-primary-bg-default": "var(--cdp-web-colors-bg-primary)",
};

See


FontTokens

type FontTokens = Flattened<{
  font: typeof font;
}>;
All font properties in the theme.

Example

const fontTokens: FontTokens = {
  "font-family-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
  "font-size-base": "16px",
};

See

font for the default token values

ColorTokens

type ColorTokens = 
  | SemanticColors
  | ComponentColors;
Defines all the colors in the theme. To fully change the theme, you only need to define the SemanticColors, and the rest of the values will inherit from them. For more granular control, individual ComponentColors can be overridden. For example, the colors-bg-primary semantic color is used to define the background color for a “primary” variant component. The colors-cta-primary-bg-default component color inherits from the colors-bg-primary semantic color via CSS variables. If you want to override the just the default background color of the primary cta, you can do so by defining the colors-cta-primary-bg-default token in the theme.

Example

// Change the primary background color to teal but make the primary cta button black
const theme: Theme = {
  "colors-bg-primary": "teal",
  "colors-cta-primary-bg-default": "black",
};

Theme

type Theme = ColorTokens & FontTokens;
The theme is a flattened tokens object with values appropriate for web environments (i.e. CSS properties & CSS Variables). It DOES NOT include the namespace (--cdp-web-) in the keys.

ButtonVariant

type ButtonVariant = 
  | "primary"
  | "secondary"
  | "linkPrimary"
  | "linkSecondary"
  | "transparentPrimary"
  | "transparentSecondary"
  | "control";
The variant of a button.

Size

type Size = "lg" | "md" | "sm" | "xs";
Base sizes for the theme.

ButtonSize

type ButtonSize = 
  | Size
  | "none";
The size of a button.

InputSize

type InputSize = Size;
The size of a form input.

Tokens

type Tokens = typeof tokens;
All design tokens.

KebabCasePaths<T>

type KebabCasePaths<T> = T extends Record<string, unknown> ? { [K in keyof T]: T[K] extends { value: unknown } ? K & string : T[K] extends Record<string, unknown> ? `${K & string}-${KebabCasePaths<T[K]> & string}` : K & string }[keyof T] : never;
A type that recursively converts a nested object to a flattened object with kebab-case keys.

Type Parameters

Type Parameter
T

Example

type MyObject = {
  a: {
    b: {
      cKey: string;
    };
  };
};

type Flattened = Flattened<MyObject>;
// { 'a-b-cKey': string }

Flattened<T>

type Flattened<T> = { [K in KebabCasePaths<T>]: string };
A flattened representation of the Tokens type, where keys are kebab-cased paths and all values are strings.

Type Parameters

Type Parameter
T extends Record<string, unknown>

Example

const themeOverrides: Partial<Flattened<typeof tokens>> = {
  'colors-brand-primary': string;
  'fontFamily-sans': string;
}

TokenValue

type TokenValue = object;
Represents a single theme value, which can be a direct value or a reference with modifications.

Properties

PropertyType
valuestring | number
modify?object
modify.type"alpha"
modify.valuenumber | string

NestedTokenObject

type NestedTokenObject = object;
Represents a nested structure of theme values.

Index Signature

[key: string]: 
  | TokenValue
  | NestedTokenObject

CDPWebCSSVariables

type CDPWebCSSVariables = object;
CSS variables for the CDP web component library.

Index Signature

[key: `--cdp-web-${string}`]: string

CamelToSnakeCase<T>

type CamelToSnakeCase<T> = T extends `${infer A}${infer B}` ? B extends Uncapitalize<B> ? `${A}${CamelToSnakeCase<B>}` : `${Uncapitalize<A>}_${CamelToSnakeCase<Uncapitalize<B>>}` : T;
Convert a camel case string to a snake case string

Type Parameters

Type Parameter
T extends string

CamelToSnakeCaseNested<T>

type CamelToSnakeCaseNested<T> = T extends readonly any[] ? T : T extends object ? { [K in keyof T as K extends string ? CamelToSnakeCase<K> : K]: CamelToSnakeCaseNested<T[K]> } : T;
Convert a camel case object to a snake case object

Type Parameters

Type Parameter
T

FundAction

type FundAction = 
  | {
  type: "SET_FIELD";
  payload: { [K in keyof FundState]: { field: K; value: FundState[K] } }[keyof FundState];
}
  | {
  type: "SET_AMOUNTS";
  payload: {
     cryptoAmount: number;
     fiatAmount: number;
  };
}
  | {
  type: "FETCH_EXCHANGE_RATE";
}
  | {
  type: "SET_EXCHANGE_RATE_SUCCESS";
  payload: {
     exchangeRate: number | undefined;
  };
}
  | {
  type: "SET_EXCHANGE_RATE_ERROR";
  payload: {
     error: Partial<NonNullable<FundState["exchangeRateError"]>>;
  };
}
  | {
  type: "FETCH_PAYMENT_METHODS";
}
  | {
  type: "SET_PAYMENT_METHODS_SUCCESS";
  payload: {
     paymentMethods: FundPaymentMethod[];
  };
}
  | {
  type: "SET_PAYMENT_METHODS_ERROR";
  payload: {
     error: Partial<NonNullable<FundState["paymentMethodsError"]>>;
  };
}
  | {
  type: "SET_TRANSACTION_STATUS";
  payload: {
     transactionStatus: FundLifecycleStatus;
  };
}
  | {
  type: "SYNC_WITH_PROPS";
  payload: FundStateProps;
};
The actions that can be dispatched to the Fund component.

FetchBuyOptions()

type FetchBuyOptions = (params) => Promise<OnrampBuyOptionsResponse>;
Get Buy Options function (used for building list of payment methods)

Parameters

ParameterType
params{ country: string; subdivision?: string; }
params.countrystring
params.subdivision?string

Returns

Promise<OnrampBuyOptionsResponse>

FetchBuyQuote()

type FetchBuyQuote = (params) => Promise<OnrampBuyQuoteResponse>;
Get Buy Quote function (used for fetching the exchange rate and building the buy url)

Parameters

ParameterType
params{ destinationAddress: string; purchaseCurrency: string; purchaseNetwork: string; paymentAmount: string; paymentCurrency: string; paymentMethod: string; country: string; subdivision?: string; }
params.destinationAddressstring
params.purchaseCurrencystring
params.purchaseNetworkstring
params.paymentAmountstring
params.paymentCurrencystring
params.paymentMethodstring
params.countrystring
params.subdivision?string

Returns

Promise<OnrampBuyQuoteResponse>

FundContextType

type FundContextType = object;
The context type for the Fund component.

Properties

PropertyType
stateFundState
dispatchDispatch<FundAction>
fetchBuyUrl(params, onError?) => Promise<string>

FundLifecycleStatus

type FundLifecycleStatus = 
  | {
  statusName: "init";
  statusData: null;
}
  | {
  statusName: "exit";
  statusData: null;
}
  | {
  statusName: "error";
  statusData: OnrampError;
}
  | {
  statusName: "transactionSubmitted";
  statusData: null;
}
  | {
  statusName: "transactionSuccess";
  statusData:   | OnrampSuccessEventData
     | null;
}
  | {
  statusName: "transactionPending";
  statusData: null;
};
The lifecycle statuses of the Fund component.

FundPresetAmountInputs

type FundPresetAmountInputs = readonly [number, number, number];
Present amounts for the fund component.

FundStateError

type FundStateError = object;
The type for an error that may get displayed in the UI.

Properties

PropertyType
codestring
messagestring

FundStateProps

type FundStateProps = Pick<FundState, 
  | "country"
  | "cryptoCurrency"
  | "cryptoDecimalPlaces"
  | "fiatCurrency"
  | "fiatDecimalPlaces"
  | "locale"
  | "network"
  | "presetAmountInputs"
| "subdivision">;
Props from the Fund component that are used in the FundState.

InputType

type InputType = "crypto" | "fiat";
The type of input (crypto or fiat)

OnrampAmount

type OnrampAmount = object;
Onramp Amount

Properties

PropertyType
valuestring
currencystring

OnrampBuyQuoteResponse

type OnrampBuyQuoteResponse = object;
The response from the Onramp Buy Quote API

Properties

PropertyTypeDescription
paymentTotalOnrampAmountObject with amount and currency of the total fiat payment required to complete the purchase, inclusive of any fees. The currency will match the paymentCurrency in the request if it is supported, otherwise it falls back to USD.
paymentSubtotalOnrampAmountObject with amount and currency of the fiat cost of the crypto asset to be purchased, exclusive of any fees. The currency will match the paymentCurrency.
purchaseAmountOnrampAmountObject with amount and currency of the crypto that to be purchased. The currency will match the purchaseCurrency in the request. The number of decimals will be based on the crypto asset.
coinbaseFeeOnrampAmountObject with amount and currency of the fee changed by the Coinbase exchange to complete the transaction. The currency will match the paymentCurrency.
networkFeeOnrampAmountObject with amount and currency of the network fee required to send the purchased crypto to the user’s wallet. The currency will match the paymentCurrency.
quoteIdstringReference to the quote that should be passed into the initialization parameters when launching the Coinbase Onramp widget via the SDK or URL generator.
onrampUrl?stringReady-to-use one-click-buy URL. Only returned when destination_address is provided in the request.

OnrampBuyOptionsResponse

type OnrampBuyOptionsResponse = object;
The response from the Onramp Buy Options API

Properties

PropertyTypeDescription
paymentCurrenciesOnrampPaymentCurrency[]List of supported fiat currencies that can be exchanged for crypto on Onramp in the given location. Each currency contains a list of available payment methods, with min and max transaction limits for that currency.
purchaseCurrenciesOnrampPurchaseCurrency[]List of available crypto assets that can be bought on Onramp in the given location.

OnrampBuyOptionsSnakeCaseResponse

type OnrampBuyOptionsSnakeCaseResponse = CamelToSnakeCaseNested<OnrampBuyOptionsResponse>;
The response from the Onramp Buy Options API in snake case. For the v1 API, the response is in snake case.

OnrampBuyQuoteSnakeCaseResponse

type OnrampBuyQuoteSnakeCaseResponse = CamelToSnakeCaseNested<OnrampBuyQuoteResponse>;
The response from the Onramp Buy Quote API in snake case. For the v1 API, the response is in snake case.

OnrampNetwork

type OnrampNetwork = object;
Network data

Properties

PropertyType
namestring
displayNamestring
chainIdstring
contractAddressstring
iconUrlstring

OnrampPaymentCurrency

type OnrampPaymentCurrency = object;
Payment currency data

Properties

PropertyType
idstring
limitsOnrampPaymentMethodLimit[]

OnrampPaymentMethodLimit

type OnrampPaymentMethodLimit = object;
Payment method limit data

Properties

PropertyType
idstring
minstring
maxstring

OnrampPurchaseCurrency

type OnrampPurchaseCurrency = object;
Purchase currency data

Properties

PropertyType
idstring
namestring
symbolstring
iconUrlstring
networksOnrampNetwork[]

OnrampSuccessEventData

type OnrampSuccessEventData = object;
Data that is emitted with the onramp transaction success event.

Properties

PropertyType
assetImageUrlstring
assetNamestring
assetSymbolstring
chainIdstring

SignInAction

type SignInAction = 
  | {
  type: "SET_AUTH_METHOD";
  payload: {
     authMethod: AuthMethod;
  };
}
  | {
  type: "SET_EMAIL";
  payload: {
     email: string;
  };
}
  | {
  type: "SUBMIT_EMAIL";
  payload: {
     email: string;
  };
}
  | {
  type: "SUBMIT_EMAIL_SUCCESS";
  payload: {
     flowId: string;
  };
}
  | {
  type: "SUBMIT_EMAIL_FAILURE";
  payload: {
     error:   | string
        | APIError;
  };
}
  | {
  type: "SET_PHONE_NUMBER";
  payload: {
     phoneNumber: string;
  };
}
  | {
  type: "SUBMIT_PHONE_NUMBER";
  payload: {
     phoneNumber: string;
  };
}
  | {
  type: "SUBMIT_PHONE_NUMBER_SUCCESS";
  payload: {
     flowId: string;
  };
}
  | {
  type: "SUBMIT_PHONE_NUMBER_FAILURE";
  payload: {
     error:   | string
        | APIError;
  };
}
  | {
  type: "SET_OTP";
  payload: {
     otp: string;
  };
}
  | {
  type: "SUBMIT_OTP";
  payload: {
     otp: string;
  };
}
  | {
  type: "SUBMIT_OTP_SUCCESS";
  payload: {
     otp: string;
  };
}
  | {
  type: "SUBMIT_OTP_FAILURE";
  payload: {
     error:   | string
        | APIError;
  };
}
  | {
  type: "ALLOW_RESET_OTP";
}
  | {
  type: "RESET_OTP";
}
  | {
  type: "CLEAR_ERROR";
}
  | {
  type: "RESET_STATE";
};
The actions that can be performed on the SignIn state.

Variables

AUTH_METHODS

const AUTH_METHODS: readonly ["email", "sms"];
The auth methods that can be used to sign in.

theme

const theme: Flattened<{
  colors: {
     page: {
        bg: {
           default: {
              value: "{colors.bg.default}";
           };
        };
        border: {
           default: {
              value: "{colors.line.default}";
           };
        };
        text: {
           default: {
              value: "{colors.fg.default}";
           };
           muted: {
              value: "{colors.fg.muted}";
           };
        };
     };
     cta: {
        primary: {
           bg: {
              default: {
                 value: "{colors.bg.primary}";
              };
              hover: {
                 value: "{colors.bg.primary}";
                 modify: {
                    type: "alpha";
                    value: "0.9";
                 };
              };
           };
           border: {
              focus: {
                 value: "{colors.line.primary}";
              };
           };
           text: {
              default: {
                 value: "{colors.fg.onPrimary}";
              };
              hover: {
                 value: "{colors.fg.onPrimary}";
              };
           };
        };
        secondary: {
           bg: {
              default: {
                 value: "{colors.bg.secondary}";
              };
              hover: {
                 value: "{colors.bg.secondary}";
                 modify: {
                    type: "alpha";
                    value: "0.9";
                 };
              };
           };
           border: {
              focus: {
                 value: "{colors.line.primary}";
              };
           };
           text: {
              default: {
                 value: "{colors.fg.onSecondary}";
              };
              hover: {
                 value: "{colors.fg.onSecondary}";
              };
           };
        };
     };
     link: {
        primary: {
           text: {
              default: {
                 value: "{colors.fg.primary}";
              };
              hover: {
                 value: "{colors.fg.primary}";
                 modify: {
                    type: "alpha";
                    value: "0.9";
                 };
              };
           };
        };
        secondary: {
           text: {
              default: {
                 value: "{colors.fg.default}";
              };
              hover: {
                 value: "{colors.fg.default}";
                 modify: {
                    type: "alpha";
                    value: "0.9";
                 };
              };
           };
        };
     };
     input: {
        bg: {
           default: {
              value: "{colors.bg.default}";
           };
        };
        border: {
           default: {
              value: "{colors.line.heavy}";
           };
           focus: {
              value: "{colors.line.primary}";
           };
           error: {
              value: "{colors.line.negative}";
           };
           success: {
              value: "{colors.line.positive}";
           };
        };
        label: {
           default: {
              value: "{colors.fg.default}";
           };
        };
        placeholder: {
           default: {
              value: "{colors.fg.muted}";
           };
        };
        text: {
           default: {
              value: "{colors.fg.default}";
           };
        };
        errorText: {
           default: {
              value: "{colors.fg.negative}";
           };
        };
        successText: {
           default: {
              value: "{colors.fg.positive}";
           };
        };
     };
     select: {
        label: {
           default: {
              value: "{colors.fg.default}";
           };
        };
        trigger: {
           bg: {
              default: {
                 value: "{colors.bg.default}";
              };
           };
           border: {
              default: {
                 value: "{colors.line.default}";
              };
              focus: {
                 value: "{colors.line.primary}";
              };
              error: {
                 value: "{colors.line.negative}";
              };
              success: {
                 value: "{colors.line.positive}";
              };
           };
           placeholder: {
              default: {
                 value: "{colors.fg.muted}";
              };
           };
           text: {
              default: {
                 value: "{colors.fg.default}";
              };
           };
           errorText: {
              default: {
                 value: "{colors.fg.negative}";
              };
           };
           successText: {
              default: {
                 value: "{colors.fg.positive}";
              };
           };
        };
        list: {
           bg: {
              default: {
                 value: "{colors.bg.default}";
              };
           };
           border: {
              default: {
                 value: "{colors.line.default}";
              };
              focus: {
                 value: "{colors.line.primary}";
              };
              error: {
                 value: "{colors.line.negative}";
              };
              success: {
                 value: "{colors.line.positive}";
              };
           };
           item: {
              bg: {
                 default: {
                    value: "{colors.bg.default}";
                 };
                 highlight: {
                    value: "{colors.bg.secondary}";
                 };
              };
              text: {
                 default: {
                    value: "{colors.fg.default}";
                 };
                 muted: {
                    value: "{colors.fg.muted}";
                 };
                 onHighlight: {
                    value: "{colors.fg.default}";
                 };
                 mutedOnHighlight: {
                    value: "{colors.fg.muted}";
                 };
              };
           };
        };
     };
     code: {
        bg: {
           default: {
              value: "{colors.bg.alternate}";
           };
        };
        border: {
           default: {
              value: "{colors.line.heavy}";
           };
        };
        text: {
           default: {
              value: "{colors.fg.default}";
           };
        };
     };
     bg: {
        default: {
           value: "#ffffff";
        };
        alternate: {
           value: "#eef0f3";
        };
        overlay: {
           value: "{colors.bg.alternate}";
           modify: {
              type: "alpha";
              value: 0.33;
           };
        };
        skeleton: {
           value: "{colors.fg.default}";
           modify: {
              type: "alpha";
              value: 0.1;
           };
        };
        primary: {
           value: "#0052ff";
        };
        secondary: {
           value: "#eef0f3";
        };
     };
     fg: {
        default: {
           value: "#0a0b0d";
        };
        muted: {
           value: "#5b616e";
        };
        primary: {
           value: "#0052ff";
        };
        onPrimary: {
           value: "#ffffff";
        };
        onSecondary: {
           value: "#0a0b0d";
        };
        positive: {
           value: "#098551";
        };
        negative: {
           value: "#cf202f";
        };
        warning: {
           value: "#ed702f";
        };
     };
     line: {
        default: {
           value: "#dcdfe4";
        };
        heavy: {
           value: "#9397a0";
        };
        primary: {
           value: "{colors.fg.primary}";
        };
        positive: {
           value: "{colors.fg.positive}";
        };
        negative: {
           value: "{colors.fg.negative}";
        };
     };
  };
  font: {
     family: {
        mono: {
           value: "\"DM Mono\", monospace";
        };
        sans: {
           value: "\"DM Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
        };
     };
     size: {
        base: {
           value: 16;
        };
     };
  };
}>;
The theme is a flattened tokens object with values appropriate for web environments (i.e. CSS properties & CSS Variables). It DOES NOT include the namespace (--cdp-web-) in the keys.

Example

const theme: Partial<Theme> = {
  "colors-bg-primary": "#0052ff",
  "colors-cta-primary-bg-default": "var(--cdp-web-colors-bg-primary)",
  "font-size-base": "16px",
};

colorsBase

const colorsBase: object;
All colors used in the CDP web component library default theme.

Type declaration

blue500
readonly blue500: "#0052ff" = "#0052ff";
blue550
readonly blue550: "#014cec" = "#014cec";
black
readonly black: "#0a0b0d" = "#0a0b0d";
white
readonly white: "#ffffff" = "#ffffff";
gray50
readonly gray50: "#f9fafb" = "#f9fafb";
gray100
readonly gray100: "#eef0f3" = "#eef0f3";
gray200
readonly gray200: "#dcdfe4" = "#dcdfe4";
gray500
readonly gray500: "#9397a0" = "#9397a0";
gray700
readonly gray700: "#5b616e" = "#5b616e";
gray900
readonly gray900: "#1a1d21" = "#1a1d21";
red500
readonly red500: "#cf202f" = "#cf202f";
green500
readonly green500: "#098551" = "#098551";
amber500
readonly amber500: "#ed702f" = "#ed702f";

colorsSemantic

const colorsSemantic: object;
These are the default values for the semantic color tokens. Semantic colors are the base colors for the theme. They are typically not used directly in the components, but are used to define the base colors for the components.

Type declaration

bg
readonly bg: object;
Type declaration
bg.default
readonly default: object;
Type declaration
bg.default.value
readonly value: "#ffffff" = colorsBase.white;
bg.alternate
readonly alternate: object;
Type declaration
bg.alternate.value
readonly value: "#eef0f3" = colorsBase.gray100;
bg.overlay
readonly overlay: object;
Type declaration
bg.overlay.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
bg.overlay.modify
readonly modify: object;
Type declaration
bg.overlay.modify.type
readonly type: "alpha" = "alpha";
bg.overlay.modify.value
readonly value: 0.33 = 0.33;
bg.skeleton
readonly skeleton: object;
Type declaration
bg.skeleton.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
bg.skeleton.modify
readonly modify: object;
Type declaration
bg.skeleton.modify.type
readonly type: "alpha" = "alpha";
bg.skeleton.modify.value
readonly value: 0.1 = 0.1;
bg.primary
readonly primary: object;
Type declaration
bg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
bg.secondary
readonly secondary: object;
Type declaration
bg.secondary.value
readonly value: "#eef0f3" = colorsBase.gray100;
fg
readonly fg: object;
Type declaration
fg.default
readonly default: object;
Type declaration
fg.default.value
readonly value: "#0a0b0d" = colorsBase.black;
fg.muted
readonly muted: object;
Type declaration
fg.muted.value
readonly value: "#5b616e" = colorsBase.gray700;
fg.primary
readonly primary: object;
Type declaration
fg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
fg.onPrimary
readonly onPrimary: object;
Type declaration
fg.onPrimary.value
readonly value: "#ffffff" = colorsBase.white;
fg.onSecondary
readonly onSecondary: object;
Type declaration
fg.onSecondary.value
readonly value: "#0a0b0d" = colorsBase.black;
fg.positive
readonly positive: object;
Type declaration
fg.positive.value
readonly value: "#098551" = colorsBase.green500;
fg.negative
readonly negative: object;
Type declaration
fg.negative.value
readonly value: "#cf202f" = colorsBase.red500;
fg.warning
readonly warning: object;
Type declaration
fg.warning.value
readonly value: "#ed702f" = colorsBase.amber500;
line
readonly line: object;
Type declaration
line.default
readonly default: object;
Type declaration
line.default.value
readonly value: "#dcdfe4" = colorsBase.gray200;
line.heavy
readonly heavy: object;
Type declaration
line.heavy.value
readonly value: "#9397a0" = colorsBase.gray500;
line.primary
readonly primary: object;
Type declaration
line.primary.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
line.positive
readonly positive: object;
Type declaration
line.positive.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
line.negative
readonly negative: object;
Type declaration
line.negative.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";

See

colorsComponents for the component colors that inherit from these

colorsComponents

const colorsComponents: object;
These are the default values for the component color tokens. Component colors are the colors for the individual UI components. They inherit values from the colorsSemantic.

Type declaration

page
readonly page: object;
Type declaration
page.bg
readonly bg: object;
Type declaration
page.bg.default
readonly default: object;
Type declaration
page.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
page.border
readonly border: object;
Type declaration
page.border.default
readonly default: object;
Type declaration
page.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
page.text
readonly text: object;
Type declaration
page.text.default
readonly default: object;
Type declaration
page.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
page.text.muted
readonly muted: object;
Type declaration
page.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
cta
readonly cta: object;
Type declaration
cta.primary
readonly primary: object;
Type declaration
cta.primary.bg
readonly bg: object;
Type declaration
cta.primary.bg.default
readonly default: object;
Type declaration
cta.primary.bg.default.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
cta.primary.bg.hover
readonly hover: object;
Type declaration
cta.primary.bg.hover.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
cta.primary.bg.hover.modify
readonly modify: object;
Type declaration
cta.primary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
cta.primary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
cta.primary.border
readonly border: object;
Type declaration
cta.primary.border.focus
readonly focus: object;
Type declaration
cta.primary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
cta.primary.text
readonly text: object;
Type declaration
cta.primary.text.default
readonly default: object;
Type declaration
cta.primary.text.default.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
cta.primary.text.hover
readonly hover: object;
Type declaration
cta.primary.text.hover.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
cta.secondary
readonly secondary: object;
Type declaration
cta.secondary.bg
readonly bg: object;
Type declaration
cta.secondary.bg.default
readonly default: object;
Type declaration
cta.secondary.bg.default.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
cta.secondary.bg.hover
readonly hover: object;
Type declaration
cta.secondary.bg.hover.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
cta.secondary.bg.hover.modify
readonly modify: object;
Type declaration
cta.secondary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
cta.secondary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
cta.secondary.border
readonly border: object;
Type declaration
cta.secondary.border.focus
readonly focus: object;
Type declaration
cta.secondary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
cta.secondary.text
readonly text: object;
Type declaration
cta.secondary.text.default
readonly default: object;
Type declaration
cta.secondary.text.default.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
cta.secondary.text.hover
readonly hover: object;
Type declaration
cta.secondary.text.hover.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
link
readonly link: object;
Type declaration
link.primary
readonly primary: object;
Type declaration
link.primary.text
readonly text: object;
Type declaration
link.primary.text.default
readonly default: object;
Type declaration
link.primary.text.default.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
link.primary.text.hover
readonly hover: object;
Type declaration
link.primary.text.hover.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
link.primary.text.hover.modify
readonly modify: object;
Type declaration
link.primary.text.hover.modify.type
readonly type: "alpha" = "alpha";
link.primary.text.hover.modify.value
readonly value: "0.9" = "0.9";
link.secondary
readonly secondary: object;
Type declaration
link.secondary.text
readonly text: object;
Type declaration
link.secondary.text.default
readonly default: object;
Type declaration
link.secondary.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
link.secondary.text.hover
readonly hover: object;
Type declaration
link.secondary.text.hover.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
link.secondary.text.hover.modify
readonly modify: object;
Type declaration
link.secondary.text.hover.modify.type
readonly type: "alpha" = "alpha";
link.secondary.text.hover.modify.value
readonly value: "0.9" = "0.9";
input
readonly input: object;
Type declaration
input.bg
readonly bg: object;
Type declaration
input.bg.default
readonly default: object;
Type declaration
input.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
input.border
readonly border: object;
Type declaration
input.border.default
readonly default: object;
Type declaration
input.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
input.border.focus
readonly focus: object;
Type declaration
input.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
input.border.error
readonly error: object;
Type declaration
input.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
input.border.success
readonly success: object;
Type declaration
input.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
input.label
readonly label: object;
Type declaration
input.label.default
readonly default: object;
Type declaration
input.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
input.placeholder
readonly placeholder: object;
Type declaration
input.placeholder.default
readonly default: object;
Type declaration
input.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
input.text
readonly text: object;
Type declaration
input.text.default
readonly default: object;
Type declaration
input.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
input.errorText
readonly errorText: object;
Type declaration
input.errorText.default
readonly default: object;
Type declaration
input.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
input.successText
readonly successText: object;
Type declaration
input.successText.default
readonly default: object;
Type declaration
input.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
select
readonly select: object;
Type declaration
select.label
readonly label: object;
Type declaration
select.label.default
readonly default: object;
Type declaration
select.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.trigger
readonly trigger: object;
Type declaration
select.trigger.bg
readonly bg: object;
Type declaration
select.trigger.bg.default
readonly default: object;
Type declaration
select.trigger.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.trigger.border
readonly border: object;
Type declaration
select.trigger.border.default
readonly default: object;
Type declaration
select.trigger.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
select.trigger.border.focus
readonly focus: object;
Type declaration
select.trigger.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
select.trigger.border.error
readonly error: object;
Type declaration
select.trigger.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
select.trigger.border.success
readonly success: object;
Type declaration
select.trigger.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
select.trigger.placeholder
readonly placeholder: object;
Type declaration
select.trigger.placeholder.default
readonly default: object;
Type declaration
select.trigger.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
select.trigger.text
readonly text: object;
Type declaration
select.trigger.text.default
readonly default: object;
Type declaration
select.trigger.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.trigger.errorText
readonly errorText: object;
Type declaration
select.trigger.errorText.default
readonly default: object;
Type declaration
select.trigger.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
select.trigger.successText
readonly successText: object;
Type declaration
select.trigger.successText.default
readonly default: object;
Type declaration
select.trigger.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
select.list
readonly list: object;
Type declaration
select.list.bg
readonly bg: object;
Type declaration
select.list.bg.default
readonly default: object;
Type declaration
select.list.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.list.border
readonly border: object;
Type declaration
select.list.border.default
readonly default: object;
Type declaration
select.list.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
select.list.border.focus
readonly focus: object;
Type declaration
select.list.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
select.list.border.error
readonly error: object;
Type declaration
select.list.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
select.list.border.success
readonly success: object;
Type declaration
select.list.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
select.list.item
readonly item: object;
Type declaration
select.list.item.bg
readonly bg: object;
Type declaration
select.list.item.bg.default
readonly default: object;
Type declaration
select.list.item.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.list.item.bg.highlight
readonly highlight: object;
Type declaration
select.list.item.bg.highlight.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
select.list.item.text
readonly text: object;
Type declaration
select.list.item.text.default
readonly default: object;
Type declaration
select.list.item.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.list.item.text.muted
readonly muted: object;
Type declaration
select.list.item.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
select.list.item.text.onHighlight
readonly onHighlight: object;
Type declaration
select.list.item.text.onHighlight.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.list.item.text.mutedOnHighlight
readonly mutedOnHighlight: object;
Type declaration
select.list.item.text.mutedOnHighlight.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
code
readonly code: object;
Type declaration
code.bg
readonly bg: object;
Type declaration
code.bg.default
readonly default: object;
Type declaration
code.bg.default.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
code.border
readonly border: object;
Type declaration
code.border.default
readonly default: object;
Type declaration
code.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
code.text
readonly text: object;
Type declaration
code.text.default
readonly default: object;
Type declaration
code.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";

colors

const colors: object;
All the color tokens.

Type declaration

page
readonly page: object;
Type declaration
page.bg
readonly bg: object;
Type declaration
page.bg.default
readonly default: object;
Type declaration
page.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
page.border
readonly border: object;
Type declaration
page.border.default
readonly default: object;
Type declaration
page.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
page.text
readonly text: object;
Type declaration
page.text.default
readonly default: object;
Type declaration
page.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
page.text.muted
readonly muted: object;
Type declaration
page.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
cta
readonly cta: object;
Type declaration
cta.primary
readonly primary: object;
Type declaration
cta.primary.bg
readonly bg: object;
Type declaration
cta.primary.bg.default
readonly default: object;
Type declaration
cta.primary.bg.default.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
cta.primary.bg.hover
readonly hover: object;
Type declaration
cta.primary.bg.hover.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
cta.primary.bg.hover.modify
readonly modify: object;
Type declaration
cta.primary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
cta.primary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
cta.primary.border
readonly border: object;
Type declaration
cta.primary.border.focus
readonly focus: object;
Type declaration
cta.primary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
cta.primary.text
readonly text: object;
Type declaration
cta.primary.text.default
readonly default: object;
Type declaration
cta.primary.text.default.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
cta.primary.text.hover
readonly hover: object;
Type declaration
cta.primary.text.hover.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
cta.secondary
readonly secondary: object;
Type declaration
cta.secondary.bg
readonly bg: object;
Type declaration
cta.secondary.bg.default
readonly default: object;
Type declaration
cta.secondary.bg.default.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
cta.secondary.bg.hover
readonly hover: object;
Type declaration
cta.secondary.bg.hover.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
cta.secondary.bg.hover.modify
readonly modify: object;
Type declaration
cta.secondary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
cta.secondary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
cta.secondary.border
readonly border: object;
Type declaration
cta.secondary.border.focus
readonly focus: object;
Type declaration
cta.secondary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
cta.secondary.text
readonly text: object;
Type declaration
cta.secondary.text.default
readonly default: object;
Type declaration
cta.secondary.text.default.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
cta.secondary.text.hover
readonly hover: object;
Type declaration
cta.secondary.text.hover.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
link
readonly link: object;
Type declaration
link.primary
readonly primary: object;
Type declaration
link.primary.text
readonly text: object;
Type declaration
link.primary.text.default
readonly default: object;
Type declaration
link.primary.text.default.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
link.primary.text.hover
readonly hover: object;
Type declaration
link.primary.text.hover.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
link.primary.text.hover.modify
readonly modify: object;
Type declaration
link.primary.text.hover.modify.type
readonly type: "alpha" = "alpha";
link.primary.text.hover.modify.value
readonly value: "0.9" = "0.9";
link.secondary
readonly secondary: object;
Type declaration
link.secondary.text
readonly text: object;
Type declaration
link.secondary.text.default
readonly default: object;
Type declaration
link.secondary.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
link.secondary.text.hover
readonly hover: object;
Type declaration
link.secondary.text.hover.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
link.secondary.text.hover.modify
readonly modify: object;
Type declaration
link.secondary.text.hover.modify.type
readonly type: "alpha" = "alpha";
link.secondary.text.hover.modify.value
readonly value: "0.9" = "0.9";
input
readonly input: object;
Type declaration
input.bg
readonly bg: object;
Type declaration
input.bg.default
readonly default: object;
Type declaration
input.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
input.border
readonly border: object;
Type declaration
input.border.default
readonly default: object;
Type declaration
input.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
input.border.focus
readonly focus: object;
Type declaration
input.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
input.border.error
readonly error: object;
Type declaration
input.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
input.border.success
readonly success: object;
Type declaration
input.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
input.label
readonly label: object;
Type declaration
input.label.default
readonly default: object;
Type declaration
input.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
input.placeholder
readonly placeholder: object;
Type declaration
input.placeholder.default
readonly default: object;
Type declaration
input.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
input.text
readonly text: object;
Type declaration
input.text.default
readonly default: object;
Type declaration
input.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
input.errorText
readonly errorText: object;
Type declaration
input.errorText.default
readonly default: object;
Type declaration
input.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
input.successText
readonly successText: object;
Type declaration
input.successText.default
readonly default: object;
Type declaration
input.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
select
readonly select: object;
Type declaration
select.label
readonly label: object;
Type declaration
select.label.default
readonly default: object;
Type declaration
select.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.trigger
readonly trigger: object;
Type declaration
select.trigger.bg
readonly bg: object;
Type declaration
select.trigger.bg.default
readonly default: object;
Type declaration
select.trigger.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.trigger.border
readonly border: object;
Type declaration
select.trigger.border.default
readonly default: object;
Type declaration
select.trigger.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
select.trigger.border.focus
readonly focus: object;
Type declaration
select.trigger.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
select.trigger.border.error
readonly error: object;
Type declaration
select.trigger.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
select.trigger.border.success
readonly success: object;
Type declaration
select.trigger.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
select.trigger.placeholder
readonly placeholder: object;
Type declaration
select.trigger.placeholder.default
readonly default: object;
Type declaration
select.trigger.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
select.trigger.text
readonly text: object;
Type declaration
select.trigger.text.default
readonly default: object;
Type declaration
select.trigger.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.trigger.errorText
readonly errorText: object;
Type declaration
select.trigger.errorText.default
readonly default: object;
Type declaration
select.trigger.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
select.trigger.successText
readonly successText: object;
Type declaration
select.trigger.successText.default
readonly default: object;
Type declaration
select.trigger.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
select.list
readonly list: object;
Type declaration
select.list.bg
readonly bg: object;
Type declaration
select.list.bg.default
readonly default: object;
Type declaration
select.list.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.list.border
readonly border: object;
Type declaration
select.list.border.default
readonly default: object;
Type declaration
select.list.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
select.list.border.focus
readonly focus: object;
Type declaration
select.list.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
select.list.border.error
readonly error: object;
Type declaration
select.list.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
select.list.border.success
readonly success: object;
Type declaration
select.list.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
select.list.item
readonly item: object;
Type declaration
select.list.item.bg
readonly bg: object;
Type declaration
select.list.item.bg.default
readonly default: object;
Type declaration
select.list.item.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
select.list.item.bg.highlight
readonly highlight: object;
Type declaration
select.list.item.bg.highlight.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
select.list.item.text
readonly text: object;
Type declaration
select.list.item.text.default
readonly default: object;
Type declaration
select.list.item.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.list.item.text.muted
readonly muted: object;
Type declaration
select.list.item.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
select.list.item.text.onHighlight
readonly onHighlight: object;
Type declaration
select.list.item.text.onHighlight.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
select.list.item.text.mutedOnHighlight
readonly mutedOnHighlight: object;
Type declaration
select.list.item.text.mutedOnHighlight.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
code
readonly code: object;
Type declaration
code.bg
readonly bg: object;
Type declaration
code.bg.default
readonly default: object;
Type declaration
code.bg.default.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
code.border
readonly border: object;
Type declaration
code.border.default
readonly default: object;
Type declaration
code.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
code.text
readonly text: object;
Type declaration
code.text.default
readonly default: object;
Type declaration
code.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
bg
readonly bg: object;
Type declaration
bg.default
readonly default: object;
Type declaration
bg.default.value
readonly value: "#ffffff" = colorsBase.white;
bg.alternate
readonly alternate: object;
Type declaration
bg.alternate.value
readonly value: "#eef0f3" = colorsBase.gray100;
bg.overlay
readonly overlay: object;
Type declaration
bg.overlay.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
bg.overlay.modify
readonly modify: object;
Type declaration
bg.overlay.modify.type
readonly type: "alpha" = "alpha";
bg.overlay.modify.value
readonly value: 0.33 = 0.33;
bg.skeleton
readonly skeleton: object;
Type declaration
bg.skeleton.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
bg.skeleton.modify
readonly modify: object;
Type declaration
bg.skeleton.modify.type
readonly type: "alpha" = "alpha";
bg.skeleton.modify.value
readonly value: 0.1 = 0.1;
bg.primary
readonly primary: object;
Type declaration
bg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
bg.secondary
readonly secondary: object;
Type declaration
bg.secondary.value
readonly value: "#eef0f3" = colorsBase.gray100;
fg
readonly fg: object;
Type declaration
fg.default
readonly default: object;
Type declaration
fg.default.value
readonly value: "#0a0b0d" = colorsBase.black;
fg.muted
readonly muted: object;
Type declaration
fg.muted.value
readonly value: "#5b616e" = colorsBase.gray700;
fg.primary
readonly primary: object;
Type declaration
fg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
fg.onPrimary
readonly onPrimary: object;
Type declaration
fg.onPrimary.value
readonly value: "#ffffff" = colorsBase.white;
fg.onSecondary
readonly onSecondary: object;
Type declaration
fg.onSecondary.value
readonly value: "#0a0b0d" = colorsBase.black;
fg.positive
readonly positive: object;
Type declaration
fg.positive.value
readonly value: "#098551" = colorsBase.green500;
fg.negative
readonly negative: object;
Type declaration
fg.negative.value
readonly value: "#cf202f" = colorsBase.red500;
fg.warning
readonly warning: object;
Type declaration
fg.warning.value
readonly value: "#ed702f" = colorsBase.amber500;
line
readonly line: object;
Type declaration
line.default
readonly default: object;
Type declaration
line.default.value
readonly value: "#dcdfe4" = colorsBase.gray200;
line.heavy
readonly heavy: object;
Type declaration
line.heavy.value
readonly value: "#9397a0" = colorsBase.gray500;
line.primary
readonly primary: object;
Type declaration
line.primary.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
line.positive
readonly positive: object;
Type declaration
line.positive.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
line.negative
readonly negative: object;
Type declaration
line.negative.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";

font

const font: object;
All the font tokens.

Type declaration

family
readonly family: object;
Type declaration
family.mono
readonly mono: object;
Type declaration
family.mono.value
readonly value: "\"DM Mono\", monospace" = '"DM Mono", monospace';
family.sans
readonly sans: object;
Type declaration
family.sans.value
readonly value: "\"DM Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"" = '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
size
readonly size: object;
Type declaration
size.base
readonly base: object;
Type declaration
size.base.value
readonly value: 16 = 16;

tokens

const tokens: object;
All the tokens used in the theme.

Type declaration

colors
colors: object;
Type declaration
colors.page
readonly page: object;
Type declaration
colors.page.bg
readonly bg: object;
Type declaration
colors.page.bg.default
readonly default: object;
Type declaration
colors.page.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
colors.page.border
readonly border: object;
Type declaration
colors.page.border.default
readonly default: object;
Type declaration
colors.page.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
colors.page.text
readonly text: object;
Type declaration
colors.page.text.default
readonly default: object;
Type declaration
colors.page.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.page.text.muted
readonly muted: object;
Type declaration
colors.page.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
colors.cta
readonly cta: object;
Type declaration
colors.cta.primary
readonly primary: object;
Type declaration
colors.cta.primary.bg
readonly bg: object;
Type declaration
colors.cta.primary.bg.default
readonly default: object;
Type declaration
colors.cta.primary.bg.default.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
colors.cta.primary.bg.hover
readonly hover: object;
Type declaration
colors.cta.primary.bg.hover.value
readonly value: "{colors.bg.primary}" = "{colors.bg.primary}";
colors.cta.primary.bg.hover.modify
readonly modify: object;
Type declaration
colors.cta.primary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
colors.cta.primary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
colors.cta.primary.border
readonly border: object;
Type declaration
colors.cta.primary.border.focus
readonly focus: object;
Type declaration
colors.cta.primary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
colors.cta.primary.text
readonly text: object;
Type declaration
colors.cta.primary.text.default
readonly default: object;
Type declaration
colors.cta.primary.text.default.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
colors.cta.primary.text.hover
readonly hover: object;
Type declaration
colors.cta.primary.text.hover.value
readonly value: "{colors.fg.onPrimary}" = "{colors.fg.onPrimary}";
colors.cta.secondary
readonly secondary: object;
Type declaration
colors.cta.secondary.bg
readonly bg: object;
Type declaration
colors.cta.secondary.bg.default
readonly default: object;
Type declaration
colors.cta.secondary.bg.default.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
colors.cta.secondary.bg.hover
readonly hover: object;
Type declaration
colors.cta.secondary.bg.hover.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
colors.cta.secondary.bg.hover.modify
readonly modify: object;
Type declaration
colors.cta.secondary.bg.hover.modify.type
readonly type: "alpha" = "alpha";
colors.cta.secondary.bg.hover.modify.value
readonly value: "0.9" = "0.9";
colors.cta.secondary.border
readonly border: object;
Type declaration
colors.cta.secondary.border.focus
readonly focus: object;
Type declaration
colors.cta.secondary.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
colors.cta.secondary.text
readonly text: object;
Type declaration
colors.cta.secondary.text.default
readonly default: object;
Type declaration
colors.cta.secondary.text.default.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
colors.cta.secondary.text.hover
readonly hover: object;
Type declaration
colors.cta.secondary.text.hover.value
readonly value: "{colors.fg.onSecondary}" = "{colors.fg.onSecondary}";
colors.link
readonly link: object;
Type declaration
colors.link.primary
readonly primary: object;
Type declaration
colors.link.primary.text
readonly text: object;
Type declaration
colors.link.primary.text.default
readonly default: object;
Type declaration
colors.link.primary.text.default.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
colors.link.primary.text.hover
readonly hover: object;
Type declaration
colors.link.primary.text.hover.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
colors.link.primary.text.hover.modify
readonly modify: object;
Type declaration
colors.link.primary.text.hover.modify.type
readonly type: "alpha" = "alpha";
colors.link.primary.text.hover.modify.value
readonly value: "0.9" = "0.9";
colors.link.secondary
readonly secondary: object;
Type declaration
colors.link.secondary.text
readonly text: object;
Type declaration
colors.link.secondary.text.default
readonly default: object;
Type declaration
colors.link.secondary.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.link.secondary.text.hover
readonly hover: object;
Type declaration
colors.link.secondary.text.hover.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.link.secondary.text.hover.modify
readonly modify: object;
Type declaration
colors.link.secondary.text.hover.modify.type
readonly type: "alpha" = "alpha";
colors.link.secondary.text.hover.modify.value
readonly value: "0.9" = "0.9";
colors.input
readonly input: object;
Type declaration
colors.input.bg
readonly bg: object;
Type declaration
colors.input.bg.default
readonly default: object;
Type declaration
colors.input.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
colors.input.border
readonly border: object;
Type declaration
colors.input.border.default
readonly default: object;
Type declaration
colors.input.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
colors.input.border.focus
readonly focus: object;
Type declaration
colors.input.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
colors.input.border.error
readonly error: object;
Type declaration
colors.input.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
colors.input.border.success
readonly success: object;
Type declaration
colors.input.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
colors.input.label
readonly label: object;
Type declaration
colors.input.label.default
readonly default: object;
Type declaration
colors.input.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.input.placeholder
readonly placeholder: object;
Type declaration
colors.input.placeholder.default
readonly default: object;
Type declaration
colors.input.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
colors.input.text
readonly text: object;
Type declaration
colors.input.text.default
readonly default: object;
Type declaration
colors.input.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.input.errorText
readonly errorText: object;
Type declaration
colors.input.errorText.default
readonly default: object;
Type declaration
colors.input.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
colors.input.successText
readonly successText: object;
Type declaration
colors.input.successText.default
readonly default: object;
Type declaration
colors.input.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
colors.select
readonly select: object;
Type declaration
colors.select.label
readonly label: object;
Type declaration
colors.select.label.default
readonly default: object;
Type declaration
colors.select.label.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.select.trigger
readonly trigger: object;
Type declaration
colors.select.trigger.bg
readonly bg: object;
Type declaration
colors.select.trigger.bg.default
readonly default: object;
Type declaration
colors.select.trigger.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
colors.select.trigger.border
readonly border: object;
Type declaration
colors.select.trigger.border.default
readonly default: object;
Type declaration
colors.select.trigger.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
colors.select.trigger.border.focus
readonly focus: object;
Type declaration
colors.select.trigger.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
colors.select.trigger.border.error
readonly error: object;
Type declaration
colors.select.trigger.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
colors.select.trigger.border.success
readonly success: object;
Type declaration
colors.select.trigger.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
colors.select.trigger.placeholder
readonly placeholder: object;
Type declaration
colors.select.trigger.placeholder.default
readonly default: object;
Type declaration
colors.select.trigger.placeholder.default.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
colors.select.trigger.text
readonly text: object;
Type declaration
colors.select.trigger.text.default
readonly default: object;
Type declaration
colors.select.trigger.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.select.trigger.errorText
readonly errorText: object;
Type declaration
colors.select.trigger.errorText.default
readonly default: object;
Type declaration
colors.select.trigger.errorText.default.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
colors.select.trigger.successText
readonly successText: object;
Type declaration
colors.select.trigger.successText.default
readonly default: object;
Type declaration
colors.select.trigger.successText.default.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
colors.select.list
readonly list: object;
Type declaration
colors.select.list.bg
readonly bg: object;
Type declaration
colors.select.list.bg.default
readonly default: object;
Type declaration
colors.select.list.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
colors.select.list.border
readonly border: object;
Type declaration
colors.select.list.border.default
readonly default: object;
Type declaration
colors.select.list.border.default.value
readonly value: "{colors.line.default}" = "{colors.line.default}";
colors.select.list.border.focus
readonly focus: object;
Type declaration
colors.select.list.border.focus.value
readonly value: "{colors.line.primary}" = "{colors.line.primary}";
colors.select.list.border.error
readonly error: object;
Type declaration
colors.select.list.border.error.value
readonly value: "{colors.line.negative}" = "{colors.line.negative}";
colors.select.list.border.success
readonly success: object;
Type declaration
colors.select.list.border.success.value
readonly value: "{colors.line.positive}" = "{colors.line.positive}";
colors.select.list.item
readonly item: object;
Type declaration
colors.select.list.item.bg
readonly bg: object;
Type declaration
colors.select.list.item.bg.default
readonly default: object;
Type declaration
colors.select.list.item.bg.default.value
readonly value: "{colors.bg.default}" = "{colors.bg.default}";
colors.select.list.item.bg.highlight
readonly highlight: object;
Type declaration
colors.select.list.item.bg.highlight.value
readonly value: "{colors.bg.secondary}" = "{colors.bg.secondary}";
colors.select.list.item.text
readonly text: object;
Type declaration
colors.select.list.item.text.default
readonly default: object;
Type declaration
colors.select.list.item.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.select.list.item.text.muted
readonly muted: object;
Type declaration
colors.select.list.item.text.muted.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
colors.select.list.item.text.onHighlight
readonly onHighlight: object;
Type declaration
colors.select.list.item.text.onHighlight.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.select.list.item.text.mutedOnHighlight
readonly mutedOnHighlight: object;
Type declaration
colors.select.list.item.text.mutedOnHighlight.value
readonly value: "{colors.fg.muted}" = "{colors.fg.muted}";
colors.code
readonly code: object;
Type declaration
colors.code.bg
readonly bg: object;
Type declaration
colors.code.bg.default
readonly default: object;
Type declaration
colors.code.bg.default.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
colors.code.border
readonly border: object;
Type declaration
colors.code.border.default
readonly default: object;
Type declaration
colors.code.border.default.value
readonly value: "{colors.line.heavy}" = "{colors.line.heavy}";
colors.code.text
readonly text: object;
Type declaration
colors.code.text.default
readonly default: object;
Type declaration
colors.code.text.default.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.bg
readonly bg: object;
Type declaration
colors.bg.default
readonly default: object;
Type declaration
colors.bg.default.value
readonly value: "#ffffff" = colorsBase.white;
colors.bg.alternate
readonly alternate: object;
Type declaration
colors.bg.alternate.value
readonly value: "#eef0f3" = colorsBase.gray100;
colors.bg.overlay
readonly overlay: object;
Type declaration
colors.bg.overlay.value
readonly value: "{colors.bg.alternate}" = "{colors.bg.alternate}";
colors.bg.overlay.modify
readonly modify: object;
Type declaration
colors.bg.overlay.modify.type
readonly type: "alpha" = "alpha";
colors.bg.overlay.modify.value
readonly value: 0.33 = 0.33;
colors.bg.skeleton
readonly skeleton: object;
Type declaration
colors.bg.skeleton.value
readonly value: "{colors.fg.default}" = "{colors.fg.default}";
colors.bg.skeleton.modify
readonly modify: object;
Type declaration
colors.bg.skeleton.modify.type
readonly type: "alpha" = "alpha";
colors.bg.skeleton.modify.value
readonly value: 0.1 = 0.1;
colors.bg.primary
readonly primary: object;
Type declaration
colors.bg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
colors.bg.secondary
readonly secondary: object;
Type declaration
colors.bg.secondary.value
readonly value: "#eef0f3" = colorsBase.gray100;
colors.fg
readonly fg: object;
Type declaration
colors.fg.default
readonly default: object;
Type declaration
colors.fg.default.value
readonly value: "#0a0b0d" = colorsBase.black;
colors.fg.muted
readonly muted: object;
Type declaration
colors.fg.muted.value
readonly value: "#5b616e" = colorsBase.gray700;
colors.fg.primary
readonly primary: object;
Type declaration
colors.fg.primary.value
readonly value: "#0052ff" = colorsBase.blue500;
colors.fg.onPrimary
readonly onPrimary: object;
Type declaration
colors.fg.onPrimary.value
readonly value: "#ffffff" = colorsBase.white;
colors.fg.onSecondary
readonly onSecondary: object;
Type declaration
colors.fg.onSecondary.value
readonly value: "#0a0b0d" = colorsBase.black;
colors.fg.positive
readonly positive: object;
Type declaration
colors.fg.positive.value
readonly value: "#098551" = colorsBase.green500;
colors.fg.negative
readonly negative: object;
Type declaration
colors.fg.negative.value
readonly value: "#cf202f" = colorsBase.red500;
colors.fg.warning
readonly warning: object;
Type declaration
colors.fg.warning.value
readonly value: "#ed702f" = colorsBase.amber500;
colors.line
readonly line: object;
Type declaration
colors.line.default
readonly default: object;
Type declaration
colors.line.default.value
readonly value: "#dcdfe4" = colorsBase.gray200;
colors.line.heavy
readonly heavy: object;
Type declaration
colors.line.heavy.value
readonly value: "#9397a0" = colorsBase.gray500;
colors.line.primary
readonly primary: object;
Type declaration
colors.line.primary.value
readonly value: "{colors.fg.primary}" = "{colors.fg.primary}";
colors.line.positive
readonly positive: object;
Type declaration
colors.line.positive.value
readonly value: "{colors.fg.positive}" = "{colors.fg.positive}";
colors.line.negative
readonly negative: object;
Type declaration
colors.line.negative.value
readonly value: "{colors.fg.negative}" = "{colors.fg.negative}";
font
font: object;
Type declaration
font.family
readonly family: object;
Type declaration
font.family.mono
readonly mono: object;
Type declaration
font.family.mono.value
readonly value: "\"DM Mono\", monospace" = '"DM Mono", monospace';
font.family.sans
readonly sans: object;
Type declaration
font.family.sans.value
readonly value: "\"DM Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"" = '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
font.size
readonly size: object;
Type declaration
font.size.base
readonly base: object;
Type declaration
font.size.base.value
readonly value: 16 = 16;

cssVariables

const cssVariables: CDPWebCSSVariables;
The CSS variables for the theme. This is the theme object with a namespace added to the keys (--cdp-web-).

See

theme for the theme object