You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

4 years ago
  1. +++
  2. title = "Text Area"
  3. description = "Add a multi-line plain-text editing control."
  4. categories = ["experience"]
  5. tags = ["controls"]
  6. html_attributes = ["id", "name", "class", "autocomplete", "autofocus", "cols", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "wrap", "tabindex"]
  7. custom_attributes = ["text"]
  8. snippets_used = []
  9. [[copyright]]
  10. owner = "Josh Habdas"
  11. date = "2019"
  12. license = "agpl-3.0-or-later"
  13. +++
  14. Read-only with prefilled text:
  15. ```html
  16. {{</* hackcss-textarea readonly="true" text="Only this and nothing more." */>}}
  17. ```
  18. {{< hackcss-textarea readonly="true" text="Only this and nothing more." >}}
  19. With spellcheck disabled:
  20. ```html
  21. {{</* hackcss-textarea spellcheck="false" */>}}
  22. ```
  23. {{< hackcss-textarea spellcheck="false" >}}
  24. With 16 columns and hard wrapping enabled:
  25. ```html
  26. {{</* hackcss-textarea cols="16" wrap="hard" */>}}
  27. ```
  28. {{< hackcss-textarea cols="16" wrap="hard" >}}
  29. Inside disabled form group with error label and placeholder:
  30. ```html
  31. {{</* hackcss-formgroup hastextarea="true" disabled="true" state="error" >}}
  32. {{< hackcss-label for="message" text="Message:" />}}
  33. {{< hackcss-textarea id="message" placeholder="Guestbook offline…" rows="10" >}}
  34. {{< /hackcss-formgroup */>}}
  35. ```
  36. {{< hackcss-formgroup hastextarea="true" disabled="true" state="error" >}}
  37. {{< hackcss-label for="message" text="Message:" />}}
  38. {{< hackcss-textarea id="message" placeholder="Guestbook offline…" rows="10" >}}
  39. {{< /hackcss-formgroup >}}