Custom group box widget
Content Type: Widget
Categories: User Interface
Overview
Groupbox widget that allows content in the header
Documentation
<div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">CustomGroupBoxWidget</h2><a id="user-content-customgroupboxwidget" class="anchor" aria-label="Permalink: CustomGroupBoxWidget" href="#customgroupboxwidget"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto">Custom group box widget for web</p>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Features</h2><a id="user-content-features" class="anchor" aria-label="Permalink: Features" href="#features"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<ul dir="auto">
<li>In addition to default groupbox, place content in the header.</li>
<li>Optionally use a context attribute to control the expanded/collapsed state</li>
</ul>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Usage without context attribute</h2><a id="user-content-usage-without-context-attribute" class="anchor" aria-label="Permalink: Usage without context attribute" href="#usage-without-context-attribute"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto">No specific installation. Just put your content in the header and body sections.</p>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Usage with context attribute</h2><a id="user-content-usage-with-context-attribute" class="anchor" aria-label="Permalink: Usage with context attribute" href="#usage-with-context-attribute"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto">The context attribute will be ignored if <code>Collapsible</code> is set to <code>No</code>.</p>
<p dir="auto">The attribute value will be used to set the initial expanded/collapsed state. The widget will also react to changes to the attribute value.
If the user clicks the widget header or icon to toggle the expanded state, the widget updates the attribute value.</p>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Header mode</h2><a id="user-content-header-mode" class="anchor" aria-label="Permalink: Header mode" href="#header-mode"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto">The default styling of the widget matches the header mode <code>Div</code> of the default groupbox widget. For using header (enlarged text) styles, make sure to style your header content similar to the default groupbox if you want to match the styling.</p>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Styling</h2><a id="user-content-styling" class="anchor" aria-label="Permalink: Styling" href="#styling"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto">The widget can work with the same classes Mendix provides for the default group box widget. To make this easier you can adjust the settings.json file to add design properties for the widget. The test project in the GitHub repository has an <a href="https://github.com/Itvisors/mendix-CustomGroupBoxWidget/blob/main/test/theme/settings.json">example</a></p>
<p dir="auto">Have a look at the Mendix documentation page on <a href="https://docs.mendix.com/howto8/front-end/extend-design-properties-to-customize" rel="nofollow">design properties</a> for more information.</p>
<p dir="auto">The design properties for the widget:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "itvisors.customgroupboxwidget.CustomGroupBoxWidget": [
{
"name": "Style",
"type": "Dropdown",
"description": "Choose one of the following styles to change the appearance of the groupbox.",
"options": [
{
"name": "Brand Default",
"class": "groupbox-default"
},
{
"name": "Brand Primary",
"class": "groupbox-primary"
},
{
"name": "Brand Inverse",
"class": "groupbox-inverse"
},
{
"name": "Brand Info",
"class": "groupbox-info"
},
{
"name": "Brand Success",
"class": "groupbox-success"
},
{
"name": "Brand Warning",
"class": "groupbox-warning"
},
{
"name": "Brand Danger",
"class": "groupbox-danger"
},
{
"name": "Transparent",
"class": "groupbox-transparent"
}
]
},
{
"name": "Callout style",
"type": "Toggle",
"description": "Enable the groupbox callout functionality to highlight the importance of the groupbox.",
"class": "groupbox-callout"
}
]"><pre class="notranslate"><code> "itvisors.customgroupboxwidget.CustomGroupBoxWidget": [
{
"name": "Style",
"type": "Dropdown",
"description": "Choose one of the following styles to change the appearance of the groupbox.",
"options": [
{
"name": "Brand Default",
"class": "groupbox-default"
},
{
"name": "Brand Primary",
"class": "groupbox-primary"
},
{
"name": "Brand Inverse",
"class": "groupbox-inverse"
},
{
"name": "Brand Info",
"class": "groupbox-info"
},
{
"name": "Brand Success",
"class": "groupbox-success"
},
{
"name": "Brand Warning",
"class": "groupbox-warning"
},
{
"name": "Brand Danger",
"class": "groupbox-danger"
},
{
"name": "Transparent",
"class": "groupbox-transparent"
}
]
},
{
"name": "Callout style",
"type": "Toggle",
"description": "Enable the groupbox callout functionality to highlight the importance of the groupbox.",
"class": "groupbox-callout"
}
]
</code></pre></div>
<div class="markdown-heading" dir="auto"><h2 class="heading-element" dir="auto">Issues, suggestions and feature requests</h2><a id="user-content-issues-suggestions-and-feature-requests" class="anchor" aria-label="Permalink: Issues, suggestions and feature requests" href="#issues-suggestions-and-feature-requests"><svg data-component="Octicon" class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div>
<p dir="auto"><a href="https://github.com/Itvisors/mendix-CustomGroupBoxWidget/issues">link to GitHub issues</a></p>
</article></div>
Releases
Version: 5.0.0
Framework Version: 11.12.1
Release Notes:
Mendix 11.12
Version: 4.0.0
Framework Version: 11.6.5
Release Notes:
Mendix 11.6.5
Version: 3.4.0
Framework Version: 10.24.4
Release Notes: Mendix 10.24.4
Version: 3.3.0
Framework Version: 10.18.5
Release Notes: Added context attribute for expanded/collapsed state
Version: 3.2.0
Framework Version: 10.18.0
Release Notes: Mendix 10.18
Version: 3.1.0
Framework Version: 10.12.0
Release Notes: Mendix 10.12
Version: 3.0.0
Framework Version: 9.24.2
Release Notes: Mendix 9.24. Ensure groupbox always shows expanded in design mode
Version: 2.1.0
Framework Version: 9.18.3
Release Notes: Hide contents i.s.o. removing it after collapsing. Mendix 9.18.3.
Version: 2.0.0
Framework Version: 9.12.0
Release Notes: Mendix 9.12
Version: 1.3.0
Framework Version: 9.6.5
Release Notes: Dark mode icon