CSS selectors reference
Fern selectors use Tailwind CSS utilities and CSS custom properties. This page is a reference of all .fern-* selectors for customizing your documentation site.
Layout and structure
Selectors for page layout, backgrounds, and headings.
.fern-background-image
Fixed background image.
.fern-page-heading
Primary page heading (h1).
.fern-layout-page
Page layout container.
.fern-layout-guide
Guide page layout.
.fern-layout-reference
API Reference layout with two-column grid.
.fern-layout-overview
Overview page layout.
.fern-layout-changelog
Changelog page layout.
Header components
Selectors for the site header, tabs, and mobile menu.
.fern-header
Site header container.
.fern-header-tabs
Header navigation tabs (desktop only).
.fern-header-logo-container
Header logo container.
.fern-header-search-bar
Header search input (desktop only).
Sidebar components
Selectors for sidebar navigation and tabs.
.fern-sidebar-header
Top of sidebar.
.fern-sidebar-heading
Sidebar section heading.
.fern-sidebar-heading-content
Sidebar heading text.
.fern-sidebar-link
Sidebar link.
.fern-sidebar-link-title
Sidebar link text.
.fern-sidebar-link-title-inner
Long title marquee animation.
.fern-sidebar-group
Grouped sidebar items.
.fern-sidebar-tabs
Sidebar tab navigation.
Navigation components
Selectors for breadcrumb navigation.
.fern-breadcrumb
Breadcrumb navigation.
.fern-breadcrumb-item
Breadcrumb link or text.
.fern-breadcrumb-arrow
Breadcrumb separator.
Button components
Selectors for buttons.
.fern-button
Button with variants.
Variants:
.minimal- Transparent background with subtle hover.filled- Solid background color.outlined- Border with transparent background.primary- Accent color variant.success- Green color variant.warning- Amber color variant.danger- Red color variant
Size modifiers:
.small- Smaller button (height: 1.75rem on desktop, 1.5rem on mobile).large- Larger button (height: 2.75rem on desktop, 2.5rem on mobile).square- Square button with equal width and height
.fern-button-content
Button content wrapper.
.fern-button-text
Button text.
.fern-button-group
Button group.
.fern-copy-button
Copy button for code blocks.
.fern-expand-button
Expand button for maxLines code blocks.
.fern-page-actions
Page action buttons (edit, feedback, share).
Variants:
.fern-toolbar- Removes the border styling for a toolbar-style appearance
Card components
Selectors for cards.
.fern-card
Card container.
Variants:
.interactive- Adds hover effects.elevated- Elevated appearance with accent border.active- Active state styling
Form components
Selectors for form inputs and controls.
.fern-input
Text input.
.fern-input-group
Input container with focus ring.
.fern-input-icon
Input icon.
.fern-input-right-element
Right-side input element.
.fern-input-clear-button
Input clear button.
.fern-textarea
Multi-line text input.
.fern-textarea-group
Textarea container.
.fern-checkbox-label
Checkbox label.
.fern-checkbox-item
Checkbox input.
.fern-checkbox-indicator
Checked indicator.
.fern-radio-group
Radio button group.
.fern-radio-label
Radio label.
.fern-radio-item
Radio button input.
.fern-radio-indicator
Selected indicator.
.fern-segmented-control
Segmented toggle control.
.fern-numeric-input-group
Numeric input with stepper buttons.
.fern-numeric-input-step
Numeric input stepper button.
Dropdown and selection components
Selectors for dropdowns and the product selector.
.fern-dropdown
Dropdown menu container.
.fern-dropdown-item
Dropdown menu item.
.fern-dropdown-item-indicator
Dropdown selection indicator.
.fern-selection-item
Selection item.
.fern-selection-item-icon
Selection item icon.
.fern-selection-item-title
Selection item title.
.fern-selection-item-end-icon
Selection item end icon.
.fern-product-selector
Product selector. See styles.css for examples.
.fern-product-selector-radio-group
Product selector radio group. See styles.css for examples.
Accordion components
Selectors for accordions.
.fern-accordion
Accordion container.
.fern-accordion-item
Accordion item.
.fern-accordion-trigger
Expand/collapse trigger.
.fern-accordion-trigger-arrow
Expand/collapse arrow.
.fern-accordion-trigger-title
Accordion trigger title.
Scroll area components
Selectors for scrollable areas.
.fern-scroll-area
Scrollable area container.
.fern-scroll-area-viewport
Scroll viewport.
.fern-scroll-area-scrollbar
Scrollbar.
.fern-scroll-area-thumb
Scrollbar thumb.
.fern-scroll-area-corner
Scrollbar corner.
Badge components
Selectors for badges and HTTP method tags.
.fern-docs-badge
Badge for labels, status, and HTTP methods.
MDX content components
Selectors for links, callouts, steps, and tables.
.fern-mdx-link
Link with external icon and hover underline.
.fern-callout
Callout with intent-matched colors.
Intent variants:
[data-intent="info"]- Gray/neutral (default)[data-intent="warning"]- Amber/yellow[data-intent="success"]- Green[data-intent="error"]- Red[data-intent="note"]- Blue[data-intent="launch"]- Accent color[data-intent="tip"]- Green[data-intent="check"]- Green
.fern-indent
Indent with vertical guide line.
.fern-steps
Steps container.
.fern-step
Single step.
.fern-anchor
Anchor for deep linking.
.fern-table-root
Table container.
.fern-table
Table with .sticky support for sticky headers.
Changelog filter components
Selectors for changelog filter UI. Only on changelog pages with tags.
.fern-filter-dropdown-button
Filter dropdown trigger button.
.fern-filter-dropdown-button-text
Filter button text.
.fern-filter-dropdown-button-icon
Filter button chevron.
.fern-filter-dropdown-item
Filter dropdown item.
.fern-filter-badge
Filter badge base class.
.fern-filter-badge-selected
Selected filter badge.
.fern-filter-badge-unselected
Unselected filter badge.
.fern-dropdown-checkmark
Filter dropdown checkmark.
API Reference components
Selectors for API Reference components.
.fern-api-property
API property container.
.fern-api-property-header
API property header.
.fern-api-property-key
API property name.
.fern-api-property-meta
API property metadata (type, required).
.fern-api-property-constraint
API property constraint.
Utility components
Selectors for icons, tooltips, and other elements.
.fern-highlight
Highlighted text.
.fern-mdx-icon
Inline icon (adapts to theme).
.fern-mdx-tooltip-trigger
Tooltip trigger with underline.
.fern-mdx-tooltip-content
Tooltip content.
.fern-file-icon
File type icon.
.fern-collapsible-child
Collapsible child element.
.fern-runnable-endpoint
.fern-rss-feed-button
RSS feed button.
Changelog components
Selectors for changelog pages.
.fern-changelog
Changelog page container.
Variants:
.full-width- Full-width layout with sidebar date display
.fern-changelog-entry
Changelog entry.
.fern-changelog-date
Changelog date.
.fern-changelog-content
Changelog content area.
.fern-changelog-label
Changelog entry label.