aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.1/forms
diff options
context:
space:
mode:
Diffstat (limited to 'site/content/docs/5.1/forms')
-rw-r--r--site/content/docs/5.1/forms/floating-labels.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/site/content/docs/5.1/forms/floating-labels.md b/site/content/docs/5.1/forms/floating-labels.md
index 2ac675204..a19bbdbfe 100644
--- a/site/content/docs/5.1/forms/floating-labels.md
+++ b/site/content/docs/5.1/forms/floating-labels.md
@@ -75,6 +75,21 @@ Other than `.form-control`, floating labels are only available on `.form-select`
</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.
+
+{{< example >}}
+<div class="form-floating mb-3">
+ <input type="email" readonly class="form-control-plaintext" id="floatingEmptyPlaintextInput" placeholder="[email protected]">
+ <label for="floatingEmptyPlaintextInput">Empty input</label>
+</div>
+<div class="form-floating mb-3">
+ <input type="email" readonly class="form-control-plaintext" id="floatingPlaintextInput" placeholder="[email protected]" value="[email protected]">
+ <label for="floatingPlaintextInput">Input with value</label>
+</div>
+{{< /example >}}
+
## Layout
When working with the Bootstrap grid system, be sure to place form elements within column classes.