Menu 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 Menu Schema defines how navigation menus are configured and rendered within email, page, and popup builders. It supports lists of items with links, customizable paddings, and metadata. This documentation breaks down the schema's properties, requirements, and usage examples to help you implement and customize menu blocks effectively.
Reference the Simple Schema GitHub repository for more information.
Schema Overview
This section summarizes the purpose and key characteristics of the Simple Menu Schema.
Schema Name: Simple Menu
Purpose: Defines navigational menu structures made of multiple text-and-link items with styling support.
Related Schemas:
definitions.schema.json
(for padding values)
Structure Definition
Below is the JSON Schema definition and a detailed breakdown of each property.
JSON Schema
Field Descriptions
The following tables list the field descriptions along with their corresponding data type, whether or not they are mandatory, and their description.
Level 1: simple_menu.schema.json
Properties
items
array
No
The menu items
padding-top
integer
No
The top padding (0-60)
padding-right
integer
No
The right padding (0-60)
padding-bottom
integer
No
The bottom padding (0-60)
padding-left
integer
No
The left padding (0-60)
locked
boolean
No
Whether the menu is locked
customFields
object
No
Custom fields for the menu
locked
boolean
No
Whether the module is locked Note:
Not available for single content addon
Level 2: items
Array Properties
text
string
No
The text of the menu item
link
object
No
The link object for the menu item
Level 3: link
Object Properties
title
string
No
The title of the link
href
string
No
The URL of the link
target
enum
No
The target of the link
Usage Examples
Reference an example of the schema in the following code snippet.
Example Menu
Additional Considerations
Consider the following when working with the Simple Menu Schema in Beefree SDK:
Accessibility: Use the
title
field inlink
to improve accessibility for screen readers.Responsive Design: Menu alignment and padding should be tested across devices for layout consistency.
Extensibility: Use
customFields
for non-standard properties.
Last updated
Was this helpful?