summaryrefslogtreecommitdiffstats
path: root/site/content/docs/5.3/forms/floating-labels.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/content/docs/5.3/forms/floating-labels.md
parentAdding upstream version 5.2.3+dfsg. (diff)
downloadbootstrap-html-upstream/5.3.0+dfsg.tar.xz
bootstrap-html-upstream/5.3.0+dfsg.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 '')
-rw-r--r--site/content/docs/5.3/forms/floating-labels.md (renamed from site/content/docs/5.2/forms/floating-labels.md)32
1 files changed, 30 insertions, 2 deletions
diff --git a/site/content/docs/5.2/forms/floating-labels.md b/site/content/docs/5.3/forms/floating-labels.md
index 9ec4fcd..a65a857 100644
--- a/site/content/docs/5.2/forms/floating-labels.md
+++ b/site/content/docs/5.3/forms/floating-labels.md
@@ -75,6 +75,34 @@ Other than `.form-control`, floating labels are only available on `.form-select`
</div>
{{< /example >}}
+## Disabled
+
+Add the `disabled` boolean attribute on an input, a textarea or a select to give it a grayed out appearance, remove pointer events, and prevent focusing.
+
+{{< example >}}
+<div class="form-floating mb-3">
+ <input type="email" class="form-control" id="floatingInputDisabled" placeholder="name@example.com" disabled>
+ <label for="floatingInputDisabled">Email address</label>
+</div>
+<div class="form-floating mb-3">
+ <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextareaDisabled" disabled></textarea>
+ <label for="floatingTextareaDisabled">Comments</label>
+</div>
+<div class="form-floating mb-3">
+ <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2Disabled" style="height: 100px" disabled></textarea>
+ <label for="floatingTextarea2Disabled">Comments</label>
+</div>
+<div class="form-floating">
+ <select class="form-select" id="floatingSelectDisabled" aria-label="Floating label disabled select example" disabled>
+ <option selected>Open this select menu</option>
+ <option value="1">One</option>
+ <option value="2">Two</option>
+ <option value="3">Three</option>
+ </select>
+ <label for="floatingSelectDisabled">Works with selects</label>
+</div>
+{{< /example >}}
+
## Readonly plaintext
Floating labels also support `.form-control-plaintext`, which can be helpful for toggling from an editable `<input>` to a plaintext value without affecting the page layout.
@@ -145,8 +173,8 @@ When working with the Bootstrap grid system, be sure to place form elements with
</div>
{{< /example >}}
-## Sass
+## CSS
-### Variables
+### Sass variables
{{< scss-docs name="form-floating-variables" file="scss/_variables.scss" >}}