Ghostty Config includes multiple live preview components that show exactly how your settings will appear in Ghostty, helping you make informed decisions about your configuration.
Preview Components Overview
The application includes specialized preview components for different settings:
Import/Export Preview - View your generated config in real-time
Base Color Preview - See background, foreground, and selection colors
Cursor Preview - Animated cursor showing style and color
Palette Preview - Visual grid of all 256 terminal colors
Font Preview - Interactive font testing playground
App Icon Preview - macOS app icon customization preview
Config Preview (Import/Export)
The import/export page shows your configuration as it will appear in your config file:
// From import-export/+page.svelte
< div class = "preview" >
< div class = "row p2" > # You can preview the config here </ div >
< div class = "row" >& nbsp ; </ div >
{# each Object . entries ( diff ()) as [ key , value ], i ( i )}
{# if Array . isArray ( value )}
{# each value as val , v ( v )}
< div class = "row" > < span class = "p4" >{ key } </ span > = < span class = "p5" >{ val } < /span></ div >
{ / each }
{: else }
< div class = "row" > < span class = "p4" >{ key } </ span > = < span class = "p5" >{ value } < /span></ div >
{ / if }
{ / each }
</ div >
Preview Features
Syntax Highlighting
Live Updates
Real Terminal Look
The preview uses your color palette for syntax highlighting: .p2 { color : var ( --config-palette-2 );} /* Comments in green */
.p4 { color : var ( --config-palette-4 );} /* Keys in blue */
.p5 { color : var ( --config-palette-5 );} /* Values in magenta */
This shows how your chosen colors will look with actual config syntax. The preview updates instantly as you change settings:
Add a keybinding → See it appear in the preview
Change a color → See the updated value
Adjust font size → See the new setting
The preview uses terminal styling: .preview {
background : var ( --config-bg );
font-family : var ( --config-font-family );
font-size : var ( --config-font-size );
color : var ( --config-fg );
}
This matches how the config will look when opened in Ghostty.
The preview only shows settings that differ from defaults, just like your exported config.
Base Color Preview
The base colors section includes a preview showing how colors interact:
// From settings.ts
id : "base" ,
name : "Base Colors" ,
note : "The preview here shows selected text in the second line of the command output."
The preview demonstrates:
Background color behind all text
Foreground color for normal text
Selection colors highlighting text
How colors contrast with each other
What You See
Background
The entire preview area uses your background color
Text
Normal text appears in your foreground color
Selection
Selected text uses selection-background and selection-foreground colors
Contrast
Instantly see if your color choices have sufficient contrast
Cursor Preview
The cursor preview shows your cursor style with animation:
// From settings.ts
id : "cursor" ,
name : "Cursor" ,
note : "The cursor in this preview blinks on and off at 1 second intervals for emphasis, it may not match what you see in Ghostty!"
Cursor Styles
The preview shows different cursor styles:
Block
Bar
Underline
Hollow Block
{ id : "cursorStyle" , name : "Cursor style" , type : "dropdown" , value : "block" }
Full block covering the entire character cell. { id : "cursorStyle" , name : "Cursor style" , type : "dropdown" , value : "bar" }
Vertical bar at the character position. { id : "cursorStyle" , name : "Cursor style" , type : "dropdown" , value : "underline" }
Horizontal line under the character. { id : "cursorStyle" , name : "Cursor style" , type : "dropdown" , value : "block_hollow" }
Block outline without fill.
Preview Customization
The preview reflects your settings:
Cursor Color : Shows your chosen cursor color
Cursor Opacity : Displays at your configured opacity
Text Color : Shows cursorText color under the cursor
Blinking : Animates if cursor-style-blink is enabled
The preview blink rate (1 second) is exaggerated for visibility. Actual blink rate in Ghostty may differ.
Palette Preview
The palette section displays all 256 colors in an organized grid:
// From Palette.svelte
< div class = "color-grid" >
{# each value as _ , i ( i )}
< Color
defaultValue = {defaultValue [i]}
bind:value = {value [i]}
size={40}
label={(i + 1).toString()}
/>
{/each}
</div>
Grid Layout
Colors 0-7 Standard colors in the first row:
Black, Red, Green, Yellow
Blue, Magenta, Cyan, White
Colors 8-15 Bright variants in the second row:
Bright Black (Gray), Bright Red, etc.
Colors 16-231 216-color cube (6×6×6 RGB):
Organized by hue
Rows progress through saturation and brightness
Colors 232-255 Grayscale ramp:
24 shades from dark to light
Useful for UI elements
Interactive Features
Hover to see index
Hover over any color to see its palette index (1-256)
Click to edit
Click a color swatch to open the color picker
Visual comparison
Changed colors are highlighted against defaults
Real-time updates
Color changes appear immediately in all previews
Font Playground
The font playground provides the most comprehensive preview:
// From FontPreview.svelte
< div class = "preview" style = "
font-family: {fontFamily};
font - size : { fontSize + 'px' };
font - style : { italic ? 'italic' : 'normal' };
font - weight : { bold ? 700 : 400 };
" >
< div class = "row prompt" >
< span style = "color: var(--config-palette-2);" > john </ span >
< span style = "color: var(--config-palette-6);" > @ </ span >
< span style = "color: var(--config-palette-4);" > doe - pc </ span >
< span style = "color: var(--config-palette-1); font-weight: 700;" > $ </ span >
ls
</ div >
< div class = "row" >- rwxr - xr - x 1 root < span style = "color: var(--config-palette-3); font-weight: 700;" > Documents < /span></ div >
</ div >
Test Content
The playground shows diverse content to test font rendering:
Shell Prompt
File Listings
Unicode
Symbols
Highlighting
Tests:
Regular text rendering
Color mixing
Special characters (@, $)
-rwxr-xr-x 1 root Documents
-rwxr-xr-x 1 root Downloads
Tests:
Monospace alignment
Bold text (file names)
Character spacing
-rwxr-xr-x 1 root 実行可能ファイル
Tests:
CJK character support
Unicode width handling
Font fallback
Tests:
Powerline symbols
Icon font support
Special glyphs
-rwxr-xr-x 1 root Downloads
(With background color) Tests:
Foreground/background combinations
Bold text on colored backgrounds
Contrast and readability
Interactive Controls
// From FontPreview.svelte
< Item name = "Font family" > < Text bind : value ={ fontFamily } /></ Item >
< Item name = "Font size" > < Number bind : value ={ fontSize } range ={ true } min ={ 4 } max ={ 60 } step ={ 0.5 } /></ Item >
< Item name = "Bold" > < Switch bind : checked ={ bold } /></ Item >
< Item name = "Italic" > < Switch bind : checked ={ italic } /></ Item >
The Font Playground is independent of your actual font settings. Use it to experiment, then apply your choices in the Fonts settings page.
App Icon Preview (macOS)
The macOS settings include a live preview of your custom app icon:
// From settings.ts
id : "icon" ,
name : "App Icon" ,
note : "If you choose the \" custom-style \" option, you can use any of the other icon settings to customize your icon with a live preview."
Icon Customization
The preview shows:
Icon style (official, blueprint, glass, etc.)
Frame material (aluminum, beige, plastic, chrome)
Ghost color (the ghost/character color)
Screen color (the screen background color)
Select icon style
Choose from preset styles or “custom-style” for full control
Customize colors
If using “custom-style”, adjust ghost and screen colors
Choose frame
Select frame material for the icon border
See preview
The preview updates to show your custom icon design
Preview Update Pattern
All previews use reactive state for instant updates:
// Reactive config values
const config = $state ( Object . assign ({}, defaults ));
// CSS variables bound to config
< style >
: root {
-- config - bg : { config . background };
-- config - fg : { config . foreground };
-- config - palette - 0 : {config.palette [ 0 ]};
/* ... etc */
}
</style>
// Components reference these variables
.preview {
background: var ( -- config - bg );
color : var ( -- config - fg );
}
This pattern ensures:
Instant feedback when changing settings
Consistent appearance across all previews
Real-time synchronization between settings and preview
Preview Best Practices
Use previews for comparison
Open multiple settings pages in separate tabs to compare different configurations side by side.
The Font Playground is great, but also test your settings in actual Ghostty with your daily workflow.
Use the color previews to ensure sufficient contrast for readability, especially for long coding sessions.
Always review the config preview on the Import/Export page before exporting to catch any unexpected changes.
The Font Playground includes edge cases (CJK text, symbols) to help identify font issues early.
Preview Limitations
Preview limitations to be aware of:
Browser rendering : Fonts may render slightly differently in the browser than in Ghostty
Cursor blink : Preview blink rate doesn’t match Ghostty’s actual rate
Font features : Some advanced font features (ligatures, variations) may not preview accurately
System integration : System-specific features (window decorations, blur) don’t preview
Performance : Very large palette changes may cause preview lag
Testing Changes in Ghostty
After using previews, always test in Ghostty:
Export config
Export your configuration from the Import/Export page
Save to file
Save the exported config to ~/.config/ghostty/config
Reload Ghostty
Open a new Ghostty window or reload config (Cmd+Shift+,)
Compare with preview
Compare the actual appearance with what you saw in the previews
Iterate
Make adjustments if needed and repeat
Color Changes
Font Changes
Config Preview
Color previews update instantly, but:
Changing many palette colors at once may cause brief lag
Use theme selection for bulk color changes
Individual color tweaks are performant
Font previews are cached:
First load of a new font may be slow
Subsequent uses are fast
Browser font cache speeds up repeated tests
The config preview scales well:
Handles hundreds of settings
Array settings (keybinds, palette) are optimized
Scrolling large configs is smooth
Advanced Preview Features
Live CSS Variables
Previews use CSS variables that update reactively:
// CSS variables are set based on config state
-- config - bg : #282 c34 ;
-- config - fg : # ffffff ;
-- config - palette - 0 : #1 d1f21 ;
-- config - palette - 1 : # cc6666 ;
// ... all 256 palette colors
This allows:
Preview components to reference colors without prop drilling
Instant updates across all components
Consistent color representation
Some previews remember scroll position:
// From Keybinds.svelte
let scroller : HTMLDivElement | undefined = $state ();
let scrollPosition = $state ( 0 );
function onScroll ( event : Event ) {
scrollPosition = ( event . target as HTMLDivElement ). scrollTop ;
}
$effect (() => {
if ( ! showEditor && scroller ) {
scroller . scrollTop = scrollPosition ;
}
});
This prevents jarring jumps when switching between views.
Making the Most of Previews
Iterate Quickly Use previews to quickly test ideas without leaving the browser
Compare Options Try multiple fonts or color schemes using the instant previews
Catch Issues Previews help identify problems (low contrast, unreadable fonts) before export
Build Confidence See exactly what you’re creating before committing to a config
The most effective workflow is to use previews for initial exploration and quick iterations, then test your final configuration in Ghostty for real-world validation.