summaryrefslogtreecommitdiffstats
path: root/site/layouts/partials/js-data-attributes.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 12:44:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 12:44:36 +0000
commitc1d5a801b4bc66e3866f815be00e11d1b20d3539 (patch)
tree394cfedf644640ac80b78aaddaff93ceb8eefa5e /site/layouts/partials/js-data-attributes.md
parentAdding upstream version 5.2.3+dfsg. (diff)
downloadbootstrap-html-c1d5a801b4bc66e3866f815be00e11d1b20d3539.tar.xz
bootstrap-html-c1d5a801b4bc66e3866f815be00e11d1b20d3539.zip
Adding upstream version 5.3.0+dfsg.upstream/5.3.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'site/layouts/partials/js-data-attributes.md')
-rw-r--r--site/layouts/partials/js-data-attributes.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/site/layouts/partials/js-data-attributes.md b/site/layouts/partials/js-data-attributes.md
index e99ff71..3b3696e 100644
--- a/site/layouts/partials/js-data-attributes.md
+++ b/site/layouts/partials/js-data-attributes.md
@@ -1,3 +1,5 @@
As options can be passed via data attributes or JavaScript, you can append an option name to `data-bs-`, as in `data-bs-animation="{value}"`. Make sure to change the case type of the option name from "_camelCase_" to "_kebab-case_" when passing the options via data attributes. For example, use `data-bs-custom-class="beautifier"` instead of `data-bs-customClass="beautifier"`.
As of Bootstrap 5.2.0, all components support an **experimental** reserved data attribute `data-bs-config` that can house simple component configuration as a JSON string. When an element has `data-bs-config='{"delay":0, "title":123}'` and `data-bs-title="456"` attributes, the final `title` value will be `456` and the separate data attributes will override values given on `data-bs-config`. In addition, existing data attributes are able to house JSON values like `data-bs-delay='{"show":0,"hide":150}'`.
+
+The final configuration object is the merged result of `data-bs-config`, `data-bs-`, and `js object` where the latest given key-value overrides the others.