LogoLogo
Try it outResourcesAPIsAddOnsBook a demo
  • Getting Started
    • Introduction to Beefree SDK
      • Create an Application
      • Installation and Fundamentals
        • Configuration parameters
          • Configuration Reload
          • Workspaces
          • Debugging the Beefree SDK Editor
        • Methods and Events
        • Authorization Process
        • How the UID parameter works
        • Set up two-factor authentication
        • Naming conventions
      • Development Applications
      • Manage Users
      • Manage Subscriptions
    • Tracking Message Changes
    • Sample Code
    • Release Candidate Environment
  • Visual Builders
    • Email Builder
    • Page Builder
      • Integrating Page Builder
      • Embedding videos in a page
    • Popup Builder
      • Popup Builder - Getting Started
      • Testing and Integrating
      • Setting layout and size
        • Advanced settings
    • AI-Driven Design Creation
  • APIs
    • Content Services API
      • Authentication
      • Export
      • Convert
      • Row Processing
      • AI Collection
      • Brand Style
      • Check
    • Template Catalog API
      • Authentication
      • Templates
      • Categories
      • Collections
      • Designers
      • Tags
    • HTML Importer API
      • Authentication
      • Import HTML
  • Forms
    • Form Block
    • Integrating and using the Form block
      • Passing forms to the builder
      • Form structure and parameters
      • Form layout customization
      • Allowed form fields
      • Edit form field modal
  • Rows
    • Reusable Content
      • Create Reusable Content
        • Pre-build Reusable Content
          • Implement Custom Rows
        • Save Reusable Content
          • Implement Hosted Saved Rows
          • Implement Self-hosted Saved Rows
            • Self-hosted Saved Rows Concepts and Tutorial
      • Sync Reusable Content
        • Implement Synced Rows
        • Initialize Edit Single Row Mode
      • Manage Reusable Content
    • Storage for Reusable Content
      • Hosted Saved Rows
      • Self-Hosted Saved Rows
  • File manager
    • File manager application overview
      • Mime Types and Groups
  • Server-side configurations
    • Server-side options
      • Toolbar options
      • Storage options
        • Configure your AWS S3 bucket
        • Connect your file storage system
      • Content options
      • Services options
      • Undo & Changes history
      • Custom JavaScript Libraries Injection
  • Other Customizations
    • Advanced options
      • Special Links and Merge Tags
      • Content Dialog
      • Custom Color Palette
      • Font management
      • Roles and Permissions
      • Smart Merge Tags
      • Commenting
      • Custom Attributes
      • Meta Tags
      • Custom Languages
      • Display Conditions
      • Advanced Permissions
      • Custom File Picker
      • Custom Headers
    • Appearance
      • Content Defaults
      • Custom Sidebar Position
      • Content Tile Sorting
      • Content Tile Grouping
      • Loading Spinner Theme
      • Custom Tab Layout
      • Themes
      • Custom CSS
        • Change Log
    • AMP for Email
    • Collaborative Editing
      • Co-editing Integration Guide
    • Mobile Design Mode
    • Multi-language Templates
    • Cards Style and Image Round Corners
    • Hover Effect for Buttons
    • Content Area Padding
    • Line Height
    • Frontend Commands
  • Data Structures
    • Getting Started
    • Schema Catalog
    • Simple Schema
      • Template Schema
      • Definitions Schema
      • Row Schema
      • Column Schema
      • Title Schema
      • Image Schema
      • Button Schema
      • Paragraph Schema
      • HTML Schema
      • Menu Schema
      • List Schema
      • Icon Schema
      • Divider Schema
    • Row Metadata
    • Form Validation Schema
    • Comments Schema
      • Change Schema for Comments
  • Builder AddOns
    • AddOns
      • AddOns Overview
      • Partner AddOns
        • Partner AddOns directory
        • Installing Partner AddOns
        • DeepL
        • Stability AI
        • Azure AI Vision - Image Analysis
          • Alternate Text Generation with AI
          • AI Alt Text Bulk Generation
        • AI Writing Assistant
          • Available Providers
            • OpenAI
            • Azure OpenAI
            • Anthropic
          • AI Providers and Data Security
          • AI-Generated Meta Tag Fields
          • Token Upselling
          • Apply a Brand Tone
        • Custom AI Writing Assistant
      • Custom AddOns
        • AddOn Development
        • Contribute to the Partner AddOn Marketplace
      • AddOns Configuration
      • AddOn FAQs
  • Resources
    • Error Management
      • onWarning
      • Beefree SDK Editor Errors
      • File System Provider errors
      • JSON Parser errors
      • Template Validation and Update
      • Template validation and update errors
    • Scheduled maintenances
Powered by GitBook
LogoLogo

Policies

  • Privacy & Cookies
  • Terms of Services
  • GDPR Compliance
  • Trust Center

Contact Us

  • Submit a request
  • Book a demo
  • Report a security issue
  • Beefree SDK Startup Program

Resources

  • Developer website
  • Create a Developer Account

© Bee Content Design, Inc. San Francisco, CA | Part of Growens

On this page
  • Introduction
  • Schema Overview
  • Structure Definition
  • Field Descriptions
  • Usage Examples
  • Additional Considerations

Was this helpful?

Export as PDF
  1. Data Structures
  2. Simple Schema

Button Schema

Introduction

Schemas are structured definitions that describe the format, rules, and relationships of data within a system. They ensure consistency and validate inputs. In Beefree SDK, the Simple Button Schema defines how buttons are structured and styled within email, page, and popup builders. It enables customization of appearance, behavior, and interactivity — including hover effects, borders, padding, and click-through destinations. This documentation breaks down the schema's properties, requirements, and usage examples to help you implement and design button blocks effectively.

Reference the Simple Schema GitHub repository for more information.

Schema Overview

This section summarizes the purpose and key characteristics of the Simple Button Schema.

  • Schema Name: Simple Button

  • Purpose: Defines clickable buttons with configurable text, links, styling, and hover states.

  • Related Schemas:

    • definitions.schema.json (for padding, border-radius, border-width)

Structure Definition

Below is the JSON Schema definition and a detailed breakdown of each property.

JSON Schema

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "simple_button.schema.json",
  "title": "Simple Button",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "button"
    },
    "label": {
      "type": "string",
      "format": "noAnchorTags"
    },
    "text": {
      "type": "string",
      "format": "noAnchorTags"
    },
    "align": {
      "enum": [
        "left",
        "center",
        "right"
      ]
    },
    "href": {
      "type": "string"
    },
    "target": {
      "enum": [
        "_blank",
        "_self",
        "_top"
      ]
    },
    "size": {
      "type": "integer",
      "minimum": 1
    },
    "color": {
      "type": "string"
    },
    "background-color": {
      "type": "string"
    },
    "padding-top": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "padding-right": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "padding-bottom": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "padding-left": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "contentPaddingTop": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "contentPaddingRight": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "contentPaddingLeft": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "contentPaddingBottom": {
      "$ref": "definitions.schema.json#/definitions/padding"
    },
    "hoverBackgroundColor": {
      "type": "string"
    },
    "hoverColor": {
      "type": "string"
    },
    "hoverBorderColor": {
      "type": "string"
    },
    "hoverBorderWidth": {
      "$ref": "definitions.schema.json#/definitions/borderWidth"
    },
    "locked": {
      "type": "boolean"
    },
    "border-radius": {
      "$ref": "definitions.schema.json#/definitions/borderRadius"
    },
    "border-color": {
      "type": "string"
    },
    "border-width": {
      "$ref": "definitions.schema.json#/definitions/borderWidth"
    },
    "customFields": {
      "type": "object"
    }
  }
}

Field Descriptions

The following table lists the field descriptions along with their corresponding data type, whether or not they are mandatory, and their description.

Property
Type
Mandatory
Description

text

string

The text of the button

label deprecated (use text)

string

The label of the button

href

string

The hyperlink reference

target

enum

The target of the hyperlink

size

integer

The size of the button text

color

string

The color of the button text

background-color

string

The background color of the button

padding-top

integer

The top padding of the button (0-60)

padding-right

integer

The right padding of the button (0-60)

padding-bottom

integer

The bottom padding of the button (0-60)

padding-left

integer

The left padding of the button (0-60)

contentPaddingTop

integer

The top content padding inside the button (0-60)

contentPaddingRight

integer

The right content padding inside the button (0-60)

contentPaddingLeft

integer

The left content padding inside the button (0-60)

contentPaddingBottom

integer

The bottom content padding inside the button (0-60)

hoverBackgroundColor

string

The hover background color of the button

hoverColor

string

The hover color of the button text

hoverBorderColor

string

The hover border color of the button

hoverBorderWidth

integer

The hover border width of the button (0-30)

locked

boolean

Whether the button is locked

border-radius

integer

The border radius of the button (0-60)

border-color

string

The border color of the button

border-width

integer

The border width of the button (0-30)

customFields

object

Custom fields

locked

boolean

Whether the module is locked

not available for single content addon

Usage Examples

Reference an example of the schema in the following code snippet.

Example Button

{
  "text": "Click Me",
  "href": "https://example.com",
  "target": "_blank",
  "size": 12,
  "color": "#FFFFFF",
  "background-color": "#0000FF",
  "padding-top": 10,
  "padding-right": 10,
  "padding-bottom": 10,
  "padding-left": 10,
  "contentPaddingTop": 5,
  "contentPaddingRight": 5,
  "contentPaddingLeft": 5,
  "contentPaddingBottom": 5,
  "hoverBackgroundColor": "#FF0000",
  "hoverColor": "#00FF00",
  "hoverBorderColor": "#000000",
  "hoverBorderWidth": 2,
  "locked": true,
  "border-radius": 15,
  "border-color": "#CCCCCC",
  "border-width": 1,
  "customFields": {
    "custom1": "value1",
    "custom2": "value2"
  }
}

Additional Considerations

Consider the following when working with the Simple Button Schema in Beefree SDK:

  • Accessibility: Ensure button text clearly describes its action.

  • Consistency: Use padding and border settings to align button style with other components.

  • Interactivity: Customize hover states to enhance user experience.

  • Extensibility: Use customFields for non-standard properties.

PreviousImage SchemaNextParagraph Schema

Last updated 4 days ago

Was this helpful?

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No