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.
Automatic typesetting for professional-looking multi-line titles and author names.
Support for images, custom palettes, and 12 carefully crafted color gradients.
Realistic shadows, paper textures, and depth effects for authentic book aesthetics.
Pure JavaScript and CSS implementation — no external libraries required.
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 |
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);
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)
Use images for custom cover backgrounds with the .image() method.
const cover = Coverize.cover()
.image('sample.png')
.effects({ realism: true, texture: false })
.render();
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
})
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
})
CoverizeJS is open source under the GNU General Public License 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.
Upload your own image
Your cover updates in real-time as you make changes to the configuration settings.