Button

Introduction

Name: didomi-button Component type: button

Display a button.

window.didomiConfig = {
...
components: {
layout: {...},
activeComponents: [
{
id: "ID_OF_THE_COMPONENT",
type: "button",
options: {
...,
propKey: "PROP_VALUE" // Remember to use camelCase for the key
}
}
]
}
};

Inline configuration

<didomi-button container-id="CONTAINER_ID" prop-key="PROP_VALUE" .../>

Props Options

Name

Type

Description

display

String

CSS display property. Example: 'flex', 'inline' ...

isDisabled

Boolean

Is the button disabled ?

isShown

Boolean

display/hide the element (default true)

text

DidomiText

Text of the button

For inline configuration, make sure to use kebab-case syntax. For example fontSize will become font-size

Examples

Object configuration

window.didomiConfig = {
...
components: {
layout: {...},
activeComponents: [
{
id: "section-button",
type: "button",
options: {
text: {
content: "My Button"
},
style: {
default: {
color: "white",
backgroundColor: "#F07D5A",
padding: "10px 20px"
}
}
}
}
]
}
};