CoverizeJS

About

CoverizeJS is a lightweight JavaScript library created by @aosmcleod and designed for programmatically generating beautiful book covers directly in the browser. Perfect for digital libraries, book catalogs, publishing platforms, or any application where you need consistent, professional cover visuals on demand.

Smart Typography

Automatic typesetting for professional-looking multi-line titles and author names.

Flexible Backgrounds

Support for images, custom palettes, and 12 carefully crafted color gradients.

Visual Effects

Realistic shadows, paper textures, and depth effects for authentic book aesthetics.

Zero Dependencies

Pure JavaScript and CSS implementation — no external libraries required.

API Reference

CoverizeJS uses a fluent API pattern. Chain methods to configure your cover, then call .render() to generate the DOM element.

Method Description
.title(text) Set the book title
.author(text) Set the author name
.color(preset) Apply color preset or custom colors
.image(url) Use a custom background image
.effects(obj) Enable/disable visual effects
.options(obj) Set typography and layout options
.render() Generate DOM element for insertion

Usage

Create book covers using the .cover() method, then set text content with the .title() and .author() methods.

const cover = Coverize.cover()
  .title('The Catcher in the Rye')
  .author('J.D. Salinger')
  .color(3)
  .effects({ realism: true, texture: true })
  .options({ font: 'sans', size: 'regular', emphasis: 'both', ratio: 0.67 })
  .render();

// Add to your page
document.getElementById('id')
  .appendChild(cover);
Generated Cover

Color

Style covers using custom or preset colors with the .color() method.

// Single color
.color('#e8bf68')

// Two colors for gradient
.color('#e8bf68', '#e77352')

// Preset color (0-11)
.color(2)

Color Presets

0
1
2
3
4
5
6
7
8
9
10
11
Custom Colors

Image

Use images for custom cover backgrounds with the .image() method.

const cover = Coverize.cover()
  .image('sample.png')
  .effects({ realism: true, texture: false })
  .render();
Image Example

Effects

Layer book aesthetic effects with the .effects() method.

Property Description
realism Book spine, shadows, and highlights (default: true)
texture Paper-like texture and linen pattern (default: true)
depth Subtle page and back cover imply depth (default: false)
.effects({ 
  realism: true, 
  texture: true, 
  depth: false 
})

Options

Fine-tune typography and layout with the .options() method.

Property Values
font 'serif' | 'sans' (default: 'sans')
size 'small' | 'regular' | 'large' (default: 'regular')
emphasis 'case' | 'bold' | 'both' (default: 'both')
ratio 0.5 - 1.0 width/height (default: 0.67)
.options({ 
  font: 'serif', 
  size: 'large', 
  emphasis: 'case',
  ratio: 0.8 
})

License

CoverizeJS is open source under the GNU General Public License v3.0.

GNU GPL v3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Configuration

Quick Examples

Content

Color

Image

Upload your own image

Effects

Options

Live Preview

Your cover updates in real-time as you make changes to the configuration settings.

Generated Code