Build · Widgets
Widgets
Widget extensions are custom content blocks that board admins place into predefined areas on their forum.
Package structure
{
"name": "Social Links",
"description": "Display social media links on your board.",
"html_template": "<div class=\"social-links\">\n <a href=\"{{ twitter_url }}\">Twitter</a>\n <a href=\"{{ discord_url }}\">Discord</a>\n {{{ custom_html }}}\n</div>",
"css": ".social-links { display: flex; gap: 0.5rem; }",
"settings_schema": [
{ "key": "twitter_url", "label": "Twitter URL", "type": "text", "default": "#" },
{ "key": "discord_url", "label": "Discord URL", "type": "text", "default": "#" },
{ "key": "custom_html", "label": "Custom HTML", "type": "textarea", "default": "" }
],
"allowed_areas": ["sidebar", "footer"]
}
Template syntax
{{ variable }}: outputs the value HTML-escaped. Use this for user-configurable text and URLs.
{{{ variable }}}: outputs the value raw (no escaping). Use this for admin-authored HTML content.
Variables that aren't set resolve to an empty string.
Widget areas
Use allowed_areas to restrict where your widget can be placed:
| Area Key | Location |
|---|---|
| header_banner | Full-width banner at the top of the page |
| above_board | Above the main forum content area |
| sidebar | Forum sidebar (collapsible, 300px wide) |
| below_board | Below the main forum content area |
| profile_above | Above user profile content |
| profile_sidebar | User profile sidebar |
| profile | Below user profile content |
| marketplace_sidebar | Marketplace sidebar (boards with the Marketplace extension) |
| footer | Forum footer area |
Field reference
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Widget display name (max 255 chars) |
| description | string | No | Short description (max 1000 chars) |
| html_template | string | Yes | HTML template with variable interpolation (max 50KB) |
| css | string | No | Custom CSS for the widget (max 50KB) |
| settings_schema | array | No | Array of configurable fields with key, label, type, and default |
| allowed_areas | array | No | Restrict placement to specific area keys |