From bd5a00c61b355c857b5c99323592ca432dea5d0a Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Fri, 5 Jan 2024 23:18:49 -0500 Subject: wip --- htmx/static/pico-1.5.11/docs/forms.html | 108 ++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 htmx/static/pico-1.5.11/docs/forms.html (limited to 'htmx/static/pico-1.5.11/docs/forms.html') diff --git a/htmx/static/pico-1.5.11/docs/forms.html b/htmx/static/pico-1.5.11/docs/forms.html new file mode 100644 index 0000000..6f4b140 --- /dev/null +++ b/htmx/static/pico-1.5.11/docs/forms.html @@ -0,0 +1,108 @@ +Forms • Pico CSS

Forms

All form elements are fully responsive in pure semantic HTML, allowing forms to scale gracefully across devices and viewports.

Inputs are width: 100%; by default. You can use .grid inside a form.

All native form elements are fully customizable and themeable with CSS variables.

We'll never share your email with anyone else.
<form>
+
+  <!-- Grid -->
+  <div class="grid">
+
+    <!-- Markup example 1: input is inside label -->
+    <label for="firstname">
+      First name
+      <input type="text" id="firstname" name="firstname" placeholder="First name" required>
+    </label>
+
+    <label for="lastname">
+      Last name
+      <input type="text" id="lastname" name="lastname" placeholder="Last name" required>
+    </label>
+
+  </div>
+
+  <!-- Markup example 2: input is after label -->
+  <label for="email">Email address</label>
+  <input type="email" id="email" name="email" placeholder="Email address" required>
+  <small>We'll never share your email with anyone else.</small>
+
+  <!-- Button -->
+  <button type="submit">Submit</button>
+
+</form>

Disabled and validation states:

<input type="text" placeholder="Valid" aria-invalid="false">
+<input type="text" placeholder="Invalid" aria-invalid="true">
+<input type="text" placeholder="Disabled" disabled>
+<input type="text" value="Readonly" readonly>

<fieldset> is unstyled and acts as a container for radios and checkboxes, providing a consistent margin-bottom for the set.

role="switch" on a type="checkbox" enable a custom switch.

Size
<!-- Select -->
+<label for="fruit">Fruit</label>
+<select id="fruit" required>
+  <option value="" selected>Select a fruit…</option>
+  <option>…</option>
+</select>
+
+<!-- Radios -->
+<fieldset>
+  <legend>Size</legend>
+  <label for="small">
+    <input type="radio" id="small" name="size" value="small" checked>
+    Small
+  </label>
+  <label for="medium">
+    <input type="radio" id="medium" name="size" value="medium">
+    Medium
+  </label>
+  <label for="large">
+    <input type="radio" id="large" name="size" value="large">
+    Large
+  </label>
+  <label for="extralarge">
+    <input type="radio" id="extralarge" name="size" value="extralarge" disabled>
+    Extra Large
+  </label>
+</fieldset>
+
+<!-- Checkboxes -->
+<fieldset>
+  <label for="terms">
+    <input type="checkbox" id="terms" name="terms">
+    I agree to the Terms and Conditions
+  </label>
+  <label for="terms_sharing">
+    <input type="checkbox" id="terms_sharing" name="terms_sharing" disabled checked>
+    I agree to share my information with partners
+  </label>
+</fieldset>
+
+<!-- Switches -->
+<fieldset>
+  <label for="switch">
+    <input type="checkbox" id="switch" name="switch" role="switch">
+    Publish on my profile
+  </label>
+  <label for="switch_disabled">
+    <input type="checkbox" id="switch_disabled" name="switch_disabled" role="switch_disabled" disabled checked>
+    User must change password at next logon
+  </label>
+</fieldset>

You can change a checkbox to an indeterminate state by setting the indeterminate property to true

<script>
+  document.getElementById('indeterminate-checkbox').indeterminate = true;
+</script>

Others input types:

<!-- Search -->
+<input type="search" id="search" name="search" placeholder="Search">
+
+<!-- File browser -->
+<label for="file">File browser
+  <input type="file" id="file" name="file">
+</label>
+
+<!-- Range slider -->
+<label for="range">Range slider
+  <input type="range" min="0" max="100" value="50" id="range" name="range">
+</label>
+
+<!-- Date -->
+<label for="date">Date
+  <input type="date" id="date" name="date">
+</label>
+
+<!-- Time -->
+<label for="time">Time
+  <input type="time" id="time" name="time">
+</label>
+
+<!-- Color -->
+<label for="color">Color
+  <input type="color" id="color" name="color" value="#0eaaaa">
+</label>

Code licensed MIT

\ No newline at end of file -- cgit v1.2.3