Theming options for API docs
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
Breakpoints for switching three/two and mobile view layouts. Supported in Redoc CE.
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.
Supported in Redoc CE.
Controls layout properties for Reference docs.
Supported in Redoc CE.
Supported in Redoc CE.
Allows overriding default styling of specific elements with custom CSS.
Supported in Redoc CE.
Some of the sidebar theming options are supported in Redoc CE.
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.
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'