Skip to content
Glint UI

GroupBox

A titled frame around a set of related controls, announced as one group.

Usage

import { GroupBox } from "@glint/components/group-box.slint";
import { Checkbox } from "@glint/components/checkbox.slint";
export component AppWindow inherits Window {
VerticalLayout {
alignment: center;
GroupBox {
title: "Security Options";
description: "Manage two-factor authentication and session timeouts.";
VerticalLayout {
spacing: 8px;
Checkbox { label: "Require 2FA on login"; checked: true; }
Checkbox { label: "Auto-logout after 15 minutes of inactivity"; }
}
}
}
}

GroupBox renders a bordered container card with an optional legend title and helper description. Use GroupBox when grouping multiple related controls together, reserving Field for individual input/control pairs.

Examples

Place checkboxes, radios, or switches inside a GroupBox to establish visual grouping with a clear title and description.

Simple framed container

When description is omitted, GroupBox renders a compact framed container with only its title legend.

API Reference

Properties

PropertyTypeDefaultDescription
titlein stringno defaultFrame title — the fieldset's legend; empty hides it.
descriptionin stringno defaultHelper text under the title; empty hides it.

Accessibility

  • Groupbox role. The component renders with accessible-role: groupbox.
  • Legend and description. The group’s accessible label is bound to title, and its accessible description is bound to description.
  • Slotted content. Inner controls manage their own keyboard navigation and accessible roles within the group container.