Docs Developers Status ForumSpark Hub
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 KeyLocation
header_bannerFull-width banner at the top of the page
above_boardAbove the main forum content area
sidebarForum sidebar (collapsible, 300px wide)
below_boardBelow the main forum content area
profile_aboveAbove user profile content
profile_sidebarUser profile sidebar
profileBelow user profile content
marketplace_sidebarMarketplace sidebar (boards with the Marketplace extension)
footerForum footer area

Field reference

FieldTypeRequiredDescription
namestringYesWidget display name (max 255 chars)
descriptionstringNoShort description (max 1000 chars)
html_templatestringYesHTML template with variable interpolation (max 50KB)
cssstringNoCustom CSS for the widget (max 50KB)
settings_schemaarrayNoArray of configurable fields with key, label, type, and default
allowed_areasarrayNoRestrict placement to specific area keys