> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/sections.md).

# sections

`LayoutComponent` ✅ Theme ✅ Options ❌ Content & Translations

The layout-component `sections` is mostly responsible of rendering the entities and acts as a container in the widget.

While this layout-component benefits *only* from [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle) options, a set of options are available within the `theme` property and will be applied to all children of layout-component `sections` (`section`, `preference`, `preference_value`).

| Element                 | Description                                                                    | Values                           |
| ----------------------- | ------------------------------------------------------------------------------ | -------------------------------- |
| `backgroundColor`       | Background color of a purpose card                                             | `#FFFFFF`                        |
| `borderShape`           | Border radius of a purpose card                                                | `rounded`, `squared`, `smoothed` |
| `borderWidth`           | Thickness of the border of a purpose card                                      | `thin`, `medium`, `thick`        |
| `borderColor`           | Color of the border of a purpose card                                          | `#FFFFFF`                        |
| `borderShadow`          | Shadow of a purpose card                                                       | `small`, `medium`, `big`         |
| `contentAlign`          | Text and inputs alignement (on                                                 | `left`, `center`                 |
| `nameSize`              | Size of purpose or preference name                                             | `small`, `medium`, `big`         |
| `nameColor`             | Color of purpose of preference name                                            | `#FFFFFF`                        |
| `nameFontFamily`        | Font-family \* of purpose of preference name                                   | `'Roboto', sans-serif;`          |
| `descriptionSize`       | Size of description of a purpose or a preference                               | `small`, `medium`, `big`         |
| `descriptionColor`      | Color of description of a purpose or a preference                              | `#FFFFFF`                        |
| `descriptionFontFamily` | Font-family of description of a purpose or a preference                        | `'Roboto', sans-serif;`          |
| `buttonType`            | Type of radio button / checkbox                                                | `list`, `button`                 |
| `buttonTextColor`       | Color of label of radio button / checkbox                                      | `#FFFFFF`                        |
| `buttonColor`           | Color of radio button / checkbox                                               | `#FFFFFF`                        |
| `buttonBackgroundColor` | Background color of radio button / checkbox if `button` mode has been selected | `#FFFFFF`                        |
| `buttonFontFamily`      | Font-family \* of radio button / checkbox label                                | `'Roboto', sans-serif;`          |
| `buttonShape`           | Border radius of radio button / checkbox                                       | `rounded`, `squared`, `smoothed` |

```json
PATCH https://api.didomi.io/widgets/layout-components/{layout_component_id}?organization_id=YOUR_ORG_ID&widget_id=YOUR_WIDGET_ID

{
    "type": "sections",
    "organization_id": "YOUR_ORGANIZATION_ID",
    "options": {
        "sectionOptions": {
            "card": {
                "style": {
                    "default": {
                        "padding": "32px 32px 46px"
                    }
                }
            },
            "imageType": "banner",
            "saveOnClick": true
        }  
    },
    "theme": {
        "nameSize": "medium",
        "nameColor": "#000",
        "buttonType": "button",
        "borderColor": "transparent",
        "borderShape": "squared",
        "borderWidth": "none",
        "buttonColor": "rgb(239, 193, 76)",
        "buttonShape": "squared",
        "borderShadow": "none",
        "contentAlign": "left",
        "nameFontFamily": "inherit",
        "backgroundColor": "transparent",
        "buttonTextColor": "#000",
        "descriptionSize": "medium",
        "buttonFontFamily": "inherit",
        "descriptionColor": "#000",
        "buttonBackgroundColor": "rgb(243, 240, 230)",
        "descriptionFontFamily": "inherit"
    }
}
```

*\* Font-family of widgets inherits by default from the one loaded on your website. If you want to change the font-family, you need to make sure that the new font-family is loaded on your website.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/sections.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
