Last updated

Theming options for API docs

Note

Redoc doesn't load any fonts by default, so you have to take care of it yourself.

To customize the style of your API documentation, specify the theming options in the theme.openapi.theme object. This applies regardless of your preferred docs deployment method. If you're using our Workflows (cloud hosted service) or our CLI for on-premise deployments, we recommend specifying the theming options in the Redocly configuration file.

Expand the theme schema below to show all available theming options. Options supported in Redoc Community Edition (the free and open source version of the product) are marked to distinguish them from options supported only in the premium version of the product.

theme.openapi.theme schema

breakpointsobject

Breakpoints for switching three/two and mobile view layouts. Supported in Redoc CE.

codeBlockobject

Controls the appearance of code snippets used in OpenAPI definition fields that support Markdown formatting, and in external Markdown files referenced in the API definition.

colorsobject

Supported in Redoc CE.

componentsobject
layoutobject

Controls layout properties for Reference docs.

logoobject

Supported in Redoc CE.

fabobject

Supported in Redoc CE.

overridesobject

Allows overriding default styling of specific elements with custom CSS.

rightPanelobject

Supported in Redoc CE.

schemaobject
shapeobject
sidebarobject

Some of the sidebar theming options are supported in Redoc CE.

spacingobject

Controls the spacing of items and sections in the generated API documentation. The numbers set here are used to calculate the final positioning values. Supported in Redoc CE.

typographyobject

Supported in Redoc CE.

Example theme

A simple example that you can add to your redocly.yaml, and customize with your own colours and styles.

theme:
  openapi:
    theme:
      sidebar:
        backgroundColor: 'ivory'
      rightPanel:
        textColor: 'ivory'
        backgroundColor: '#001036'
      typography:
        links:
          color: '#0090cc'