Button Design Presets Configuration Guide

Last updated on May 29, 2026 15:20

Introduction

Call-to-Action (CTA) buttons are critical for driving user engagement, lead generation, and conversions. PolyCMS integrates a flexible and robust Button Design Presets system that allows content creators and administrators to instantly style buttons using pre-configured, harmonized design systems without writing any custom CSS or HTML code.

This guide details the standard pre-built presets, their flexible JSON schema structure, and how you can load, manage, and create custom presets directly within the Block Editor.

Pre-Built Design Presets

PolyCMS comes pre-seeded with 9 production-grade, premium button presets designed for high-conversion and visual consistency across all layout themes:

Preset Name Description Key Aesthetics Target Use Case
Primary Solid (Blue) Clean, modern solid blue block. Solid #3b82f6 bg, white text, 6px radius. Default high-priority actions.
Secondary Outline (Blue) Minimalist bordered button. Transparent bg, #3b82f6 border and text. Secondary or low-priority CTAs.
SaaS (Start Free Trial) Trust-building deep indigo pill. Deep indigo #4f46e5 bg, full round pill shape. Software signups and free trials.
E-commerce (Buy Now) High-conversion orange button. Vibrant orange #f97316 bg, bold weight. Instant purchases, checkouts.
Lead Gen (Download PDF) Action-oriented teal pill button. Teal #0d9488 bg, full rounded corners. Lead magnets, resource downloads.
Premium (Book Demo) Luxury gold-bordered dark button. Deep dark #111827 bg, gold #fbbf24 text. High-ticket bookings, consultation.
Dark Minimal (Black) Modern corporate monochrome button. Jet black #111827 bg, white text. Modern portfolio, agency actions.
Case Study (Read Story) Minimal outline grey button. Solid white bg, light #e5e7eb border. Inline blog navigation, articles.
Danger / Alert (Red) Destructive action or warning button. Solid red #ef4444 bg, white text. Account deletion, critical actions.

Database Architecture and JSON Schema

Under the hood, presets are stored in the database under polycms_presets and organized hierarchically using the polycms_preset_categories table.

Each preset contains a highly customizable JSON payload that specifies precise spacing, color schemes, typography, borders, alignments, and interactive hover behaviors:

{
  "style": "custom",
  "alignment": "center",
  "target": "_self",
  "label": "Action Button",
  "bg_type": "solid",
  "bg_color": "#4f46e5",
  "text_color": "#ffffff",
  "border_color": "#4f46e5",
  "hover_bg_type": "solid",
  "hover_bg_color": "#4338ca",
  "hover_text_color": "#ffffff",
  "hover_border_color": "#4338ca",
  "border_radius": "9999px",
  "inner_padding_top": 14,
  "inner_padding_right": 36,
  "inner_padding_bottom": 14,
  "inner_padding_left": 36,
  "font_size": "1rem",
  "font_weight": "600"
}

Spacing and Typography Properties

  • Padding (inner_padding_*): Declared in pixels (px) for precise control over internal text buffer spaces.
  • Typography (font_size, font_weight): Supports standard sizing scales (0.875rem, 1rem) and CSS weight mappings (600, 700).
  • Borders (border_radius): Configures corner styling from sharp edges (0px) and classic blocks (4px, 6px) to fully rounded pills (9999px).

Editor Integration (Preset Load Modal & Preset Manager)

When editing content in the Admin Panel, the Block Editor embeds a cohesive preset interaction system:

1. The Preset Manager Panel

When you select or add a Button block, the right-sidebar settings pane loads the ButtonSettings.vue configuration form. Directly within this panel, the Preset Manager (PresetManager.vue) provides:

  • A preview window of the currently active design.
  • Direct sliders and colorpickers to override default parameters.
  • A "Load Preset" action launcher.

2. Loading a Design Style

Clicking the "Load Preset" button triggers the PresetLoadModal.vue popup:

  • Search & Filter: Search presets by name or browse by hierarchical folders (e.g. system default, custom agency templates).
  • Instant Preview: Hovering or selecting a style displays a live rendering of the button.
  • Apply Style: Confirming your selection instantly updates the button's JSON payload in the Block Editor, refactoring the visual presentation in real-time.

Conclusion & Best Practices

To maintain high visual quality across your website:

  • Limit Color Spread: Use a single primary preset for major sign-up CTAs and outline presets for secondary links.
  • System Scoping: Save verified designs as System Presets so other authors can reuse consistent button layouts on different pages.

PolyCMS is an open-source content management system for modern web applications, inspired by the WordPress plugin and theme ecosystem but built on top of the Laravel framework. It is designed to provide a complete foundation for content publishing, e-commerce, multi-language support, and extensible module architecture — powered by a Vue 3 admin panel with data served entirely through RESTful APIs.

Whether you're building a blog, a documentation site, an online store, or a multi-tenant SaaS platform, PolyCMS aims to give you a comprehensive starting scaffold so you can ship quickly and extend easily through integrated modules and themes. In particular, themes in PolyCMS follow a multi-theme architecture — one Main theme and an unlimited number of Sub themes can run side by side on the same installation.

We hope this ready-made foundation proves useful for building your next website, blog, or web app, saving you from having to start completely from scratch.