---
title: "GroupBox"
description: "GroupBox api."
---
import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';
import CodeSnippetMD from '@slint/common-files/src/components/CodeSnippetMD.astro';

<CodeSnippetMD imagePath="/src/assets/generated/std-widgets-groupbox-example.png"  imageWidth="200" imageHeight="200"  imageAlt='groupbox example'>
```slint
import { GroupBox , VerticalBox, CheckBox } from "std-widgets.slint";
export component Example inherits Window {
    width: 200px;
    height: 100px;
    GroupBox {
        title: "Groceries";
        VerticalLayout {
            CheckBox { text: "Bread"; checked: true ;}
            CheckBox { text: "Fruits"; }
        }
    }
}
```
</CodeSnippetMD>

A `GroupBox` is a container that groups its children together under a common title.

## Properties

### content-padding
<SlintProperty propName="content-padding" typeName="length" defaultValue="Depends on the style">
The padding within the layout of the content as a whole. This single value is applied to all sides.
</SlintProperty>

### enabled
<SlintProperty propName="enabled" typeName="bool" defaultValue="true">
When false, the groupbox can't be interacted with
</SlintProperty>

### title
<SlintProperty propName="title" typeName="string">
A text written as the title of the group box.
</SlintProperty>