Product Switching
Each product can contain its own distinct versions, tabs, sections, pages, and API references. Products can share content as well.
Add Products to Your Docs
Define your products
Create a products
folder inside of your fern
folder. To specify a product’s contents and navigational structure, add a .yml
file to the products
folder for each product.
Make sure to include the navigation
and tabs
properties, if applicable.
Add your product configuration
To define a product, add an item to the products
list in docs.yml
, specifying the display-name
and path
.
The optional parameters are: image
, icon
, subtitle
, slug
, and versions
.
image
and an icon
, the image
will take precedence.The below example is a docs.yml
configuration for a site with two products, Product A and Product B.
Add versioning to your products (optional)
You can optionally add versions to a product. Versioned and unversioned products can live next to each other in your site. Each version of a single product has its own yml
file.
In the below example, Product A is unversioned and Product B is versioned:
The top-level doc.yml
configuration for a Fern Docs website containing two products, one unversioned and one versioned, might look something like this:
For more information on setting up versioned products, follow our versioning docs.
Customizing Selector Styling
You can directly customize the appearance of the product and version selectors by targeting their CSS classes:
fern-product-selector
- Controls the styling of the product selectorfern-version-selector
- Controls the styling of the version selector

Common Styling Adjustments
Adjusting positioning:
Use transform: translateY(Npx)
to adjust the vertical positioning of the selectors. This ensures that the product and version selectors match the line height of your logo for better visual alignment.
Enhancing visual prominence: You can modify the border radius and add borders to make the selectors more prominent and better integrated with your site’s design aesthetic.
Customizing Dropdown Styling
The dropdown menus for product and version selectors can be customized using these specific CSS classes:
fern-product-selector-radio-group
- Controls the styling of the product dropdownfern-version-selector-radio-group
- Controls the styling of the version dropdown
Product Selector
Version Selector

Common Styling Adjustments
Enable a grid layout for the dropdown: