Block

Introduction

Name: didomi-block Component type: block
Display a div.
1
window.didomiConfig = {
2
...
3
components: {
4
activeComponents: [
5
{
6
id: "ID_OF_THE_COMPONENT",
7
type: "block",
8
options: {
9
...,
10
propKey: "PROP_VALUE" // Remember to use camelCase for the key
11
}
12
}
13
]
14
}
15
};
Copied!

Inline configuration

1
<didomi-block container-id="CONTAINER_ID" prop-key="PROP_VALUE" ...></didomi-block>
Copied!

Props Options

Name
Type
Description
display
String
CSS display property. Example: 'flex', 'inline' ...
isShown
Boolean
display/hide the element (default true)
For inline configuration, make sure to use kebab-case syntax. For example fontSize will become font-size.

Examples

Object configuration

1
window.didomiConfig = {
2
...
3
components: {
4
layout: {...},
5
activeComponents: [
6
{
7
id: "container-block",
8
type: "block",
9
options: {
10
style: {
11
default: {
12
backgroundColor: "orange",
13
fontSize: "18px"
14
}
15
}
16
}
17
}
18
]
19
}
20
};
Copied!
Last modified 9mo ago