Skip to content

Component Showcase

A reference of all UI components, patterns, and styles used throughout the theme.

Design System

Everything that defines the visual language of the Codex theme. Color tokens, surface elevation, typography, code blocks, and interactive elements.

Color Tokens

--bg
--bg-sidebar
--bg-code
--text
--text-secondary
--text-tertiary
--accent
--accent-hover
--accent-subtle
--success
--success-bg
--warning
--warning-bg
--error
--error-bg
--info
--info-bg
--border
--border-light
--code-text

Surface Elevation

--bg (base)
--bg-sidebar
--accent-subtle
--border-light
--bg-code

Typography

H1 / PAGE TITLE IBM Plex Sans 600 var(--text-4xl) / 1.3

Documentation Page Title

H2 / SECTION IBM Plex Sans 600 var(--text-3xl) / 1.3

Section Heading

H3 / SUBSECTION IBM Plex Sans 600 var(--text-2xl) / 1.3

Subsection Heading

H4 / LABEL IBM Plex Sans 600 var(--text-xl) / 1.3

Label Heading

BODY IBM Plex Sans 400 var(--text-base) / 1.7

Good documentation is written for humans first. It anticipates questions, provides context, and guides readers through concepts step by step. Every sentence should earn its place on the page.

SMALL / CAPTION IBM Plex Sans 400 var(--text-sm) / 1.5
Caption text for supplementary information, timestamps, and metadata.
INLINE CODE IBM Plex Mono 400 var(--text-sm) / 1.5

Use npm install ghost-cli to get started. Configure with config.production.json.

INLINE STYLES Various --

Bold text, italic text, underlined text, strikethrough text, and linked text within a paragraph.

Code Block

theme.js
// Ghost Content API — fetch latest posts
async function fetchPosts(apiUrl, apiKey) {
    const response = await fetch(`${apiUrl}/ghost/api/content/posts/?key=${apiKey}`);
    const { posts } = await response.json();
    return posts.map(p => ({ title: p.title, slug: p.slug }));
}

Buttons


Theme Components

Real content rendered through the theme's card partials, pulling live data from your Ghost site.

Doc Cards

Tag Cards


Ghost Editor Cards

All Ghost card types rendered inside the content wrapper, exactly as they appear in published posts.

Image Cards

Modern workspace with laptop and coffee
Developer workspace with code on screen
Earth from space at night showing city lights
Lines of code on a monitor
Photo by Unsplash — Clean code is not written by following a set of rules.

Embed Cards

YouTube embed demo
Google Maps embed demo

Bookmark Card

Ghost Documentation — Build a Custom Theme
Everything you need to know about building a custom Ghost theme from scratch, including Handlebars templates, the Content API, and theme configuration.
Ghost docs thumbnail

Callout Cards

💡
Tip: Use Ghost's card_assets configuration to automatically load CSS and JS only for the cards used on each page, improving performance.
⚠️
Warning: Deprecated helpers like #author will be removed in future Ghost versions. Migrate to #primary_author as soon as possible.
Success: Your theme passed all gscan validation checks and is ready for upload.
📝
Note: Always test your theme with gscan before uploading. Run npx gscan . from your theme directory.
📎
Reference: This is a neutral callout for general information that does not require special attention or urgency.

Toggle Cards

How do I install a custom Ghost theme?

Navigate to Ghost Admin > Settings > Design > Change theme and click Upload theme. Select your theme's ZIP file and activate it. Make sure your theme passes gscan validation before uploading.

What is the difference between pages and posts?

Posts are part of your publication's feed and can be tagged, featured, and paginated. Pages are standalone content (like About or Contact) that don't appear in feeds. Both use the same editor but have different templates: post.hbs for posts and page.hbs for pages.

Button Card

Header Cards

Plain (surface background)

Stay in the Loop

Get the latest updates on new features and releases delivered to your inbox.

Accent style with CTA

Subscribe for Full Access

Get premium articles, weekly newsletters, and exclusive deep-dives.

Subscribe

Background image + CTA button

The Future of Publishing

Ghost empowers creators and teams to build professional publications with modern tools.

Get Started

Audio Card

Podcast cover art
Episode 12: Building Ghost Themes from Scratch
0:00
24:38

Video Card

Video thumbnail
Getting started with the Ghost Editor - a video walkthrough of the publishing workflow.

File Card

Product Card

Ghost Pro Handbook

Ghost Pro Handbook

The definitive guide to building, customizing, and scaling your Ghost publication. Covers theme development, membership tiers, and performance optimization.

Purchase — $29

Signup Card

Content Elements

The best documentation is the documentation that people actually read. Make it clear, concise, and easy to navigate.

This is an aside-style blockquote used for supplementary information, tips, or editorial notes that complement the main content without interrupting the reading flow.


  • Unordered list item one
  • Unordered list item two with a longer description that wraps to demonstrate how multi-line items behave
  • Unordered list item three with bold and linked text
  1. First ordered item — install Ghost CLI globally
  2. Second ordered item — run ghost install in your server directory
  3. Third ordered item — configure config.production.json with your database credentials
Property Type Default Description
title string null The display title of the component
enabled boolean true Whether the component is active
maxItems number 10 Maximum number of items to display
theme string "auto" Color theme: "light", "dark", or "auto"

Portal & Membership

Everything related to Ghost's membership system: auth flows, subscriptions, pricing, content gating, and account states.

Sign In Form

Welcome back

Sign in to access your documentation.

Sign Up Form

Create your account

Get access to premium documentation

Check your inbox

We sent a login link to your email address. Click the link to sign in securely.

Newsletter Subscription

Standalone Newsletter Form

Pricing Tiers

Pro

Full access to all NexusDB documentation, advanced guides, and premium integrations.

$$9 /month
  • Complete API reference access
  • Advanced performance tuning guides
  • Premium integration tutorials
  • Priority support documentation
  • Early access to new features docs
  • Architecture pattern deep-dives
Subscribe

Content Gate

State: Logged out

This article is for subscribers

Subscribe to get access to premium documentation, guides, and exclusive resources.

Subscribe Now

Already a member? Sign in

State: Needs upgrade

Unlock the full article

Upgrade your account to access premium documentation.

View Plans

Member Account States

Nav — Logged out

Nav — Logged in

Jane Doe Member avatar

Sign out

Sign out

Custom Interactions

Theme-specific JS-driven components that go beyond static markup.

Table of Contents

Post content area

The TOC sidebar appears alongside long-form content. It scans h2/h3 headings and builds a navigable list with scroll-spy highlighting. The active heading is underlined with the accent color.

Scroll Reveal

Elements with class .reveal fade in when they enter the viewport. Uses IntersectionObserver with threshold: 0.1.

Before (hidden)
After (visible)

Pagination

Theme-Specific Interactions

Code Copy Button

Every code block in post content automatically gets a Copy button in the top-right corner. Clicking it copies the code and shows a brief confirmation.

const ghost = require('@tryghost/content-api');
const api = new ghost({ url: 'https://demo.ghost.io', key: 'your-key', version: 'v5.0' });

Doc Sidebar Navigation

The left sidebar organizes documentation by sections. Each section can be collapsed and expanded. The active page is highlighted with the accent color. On mobile, the sidebar slides in as an overlay.

Reading Progress Bar

A thin progress bar at the top of the page shows how far the reader has scrolled through the document content.

Page Templates

All .hbs template files available in this theme, mapped to their Ghost context or custom route.

Back to Top

A floating button appears after scrolling past the first viewport height. Clicking it smooth-scrolls to the top of the page.

Visible after scrolling down one viewport height