# 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](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomitextoptions)             |
| `logoWrapper`            | Logo container styling.                                    | [DidomiTextOptions](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomitextoptions)             |
| `logo`                   | Logo image styling and source.                             | [DidomiImageOptions](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomiimageoptions)           |
| `card`                   | Main card container styling.                               | [DidomiStyle](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomistyle)                         |
| `purposeOptions`         | Purpose component options.                                 | [DidomiPurposeOptions](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomipurposeoptions)       |
| `preferenceOptions`      | Preference component options.                              | [DidomiPreferenceOptions](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#didomipreferenceoptions) |
| `saveIndicatorWrapper`   | Save indicator positioning.                                | [DidomiStyle](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/options#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
  }
}
```
