> 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/section.md).

# section

`LayoutComponent` ❌ Theme ✅ Options ✅ Content & Translations

To edit a section element, you need to edit the layout-component `section` and send a **PATCH** request on `/widgets/layout-component/{layout-component-id}` and specify the following options in the `options` property.

| Element                  | Description                                                | Component options                                                                                                                        |
| ------------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `title`                  | Section title styling and content.                         | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)             |
| `logoWrapper`            | Logo container styling.                                    | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)             |
| `logo`                   | Logo image styling and source.                             | [DidomiImageOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomiimageoptions)           |
| `card`                   | Main card container styling.                               | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                         |
| `purposeOptions`         | Purpose component options.                                 | [DidomiPurposeOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomipurposeoptions)       |
| `preferenceOptions`      | Preference component options.                              | [DidomiPreferenceOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomipreferenceoptions) |
| `saveIndicatorWrapper`   | Save indicator positioning.                                | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                         |
| `imageType`              | Image type (logo or banner).                               | `string`                                                                                                                                 |
| `saveOnClick`            | Whether to save consents immediately upon user interaction | `boolean`                                                                                                                                |
| `contentAlign`           | Content alignment within section (left, center or right)   | `string`                                                                                                                                 |
| `isCardClickable`        | Whether the whole card is clickable.                       | `boolean`                                                                                                                                |
| `isSaveIndicatorVisible` | Whether the the save indicator is visible.                 | `boolean`                                                                                                                                |

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

{
  "type": "section",
  "organization_id": "YOUR_ORGANIZATION_ID",
  "options": {
    "title": {
      "content": {
        "en": "YOUR_SECTION_TITLE"
      }
    },
    "logoWrapper": {
      "style": {
        "default": {
          "width": "100%"
        }
      }
    },
    "logo": {
      "src": "YOUR_SECTION_LOGO"
    },
    "card": {
      "style": {
        "default": {}
      }
    },
    "purposeOptions": {
      "title": {
        "content": {
          "en": "YOUR_PURPOSE_TITLE",
          "fr": "VOTRE_TITRE_DE_FINALITE"
        }
      },
      "description": {
        "content": {
          "en": "YOUR_PURPOSE_DESCRIPTION",
          "fr": "DESC_FINALITE"
        }
      },
      "noIcon": {
        "src": "YOUR_NO_VALUE_ICON"
      },
      "noLabel": {
        "content": {
          "en": "YOUR_NO_VALUE_CONTENT",
          "fr": "VALEUR_NON_CONTENU"
        }
      },
      "yesIcon": {
        "src": "YOUR_YES_VALUE_ICON"
      },
      "yesLabel": {
        "content": {
          "en": "YOUR_YES_VALUE_CONTENT",
          "fr": "VALEUR_OUI_CONTENU"
        }
      }
    },
    "preferenceOptions": {
      "title": {
        "style": {
          "default": {}
        }
      },
      "description": {
        "style": {
          "default": {}
        }
      },
      "preferenceValuesOptions": {
        "label": {
          "style": {
            "default": {}
          }
        }
      }
    },
    "saveIndicatorWrapper": {
      "style": {
        "default": {}
      }
    },
    "imageType": "banner",
    "saveOnClick": false,
    "contentAlign": "left",
    "isCardClickable": false,
    "isSaveIndicatorVisible": false
  }
}
```


---

# 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/section.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.
