There's a newer version of Pico CSS!


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.

  <!-- 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 for="lastname">
      Last name
      <input type="text" id="lastname" name="lastname" placeholder="Last name" required>


  <!-- 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>


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.

<!-- Select -->
<label for="fruit">Fruit</label>
<select id="fruit" required>
  <option value="" selected>Select a fruit…</option>

<!-- Radios -->
  <label for="small">
    <input type="radio" id="small" name="size" value="small" checked>
  <label for="medium">
    <input type="radio" id="medium" name="size" value="medium">
  <label for="large">
    <input type="radio" id="large" name="size" value="large">
  <label for="extralarge">
    <input type="radio" id="extralarge" name="size" value="extralarge" disabled>
    Extra Large

<!-- Checkboxes -->
  <label for="terms">
    <input type="checkbox" id="terms" name="terms">
    I agree to the Terms and Conditions
  <label for="terms_sharing">
    <input type="checkbox" id="terms_sharing" name="terms_sharing" disabled checked>
    I agree to share my information with partners

<!-- Switches -->
  <label for="switch">
    <input type="checkbox" id="switch" name="switch" role="switch">
    Publish on my profile
  <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

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

  document.getElementById('indeterminate-checkbox').indeterminate = true;

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">

<!-- Range slider -->
<label for="range">Range slider
  <input type="range" min="0" max="100" value="50" id="range" name="range">

<!-- Date -->
<label for="date">Date
  <input type="date" id="date" name="date">

<!-- Time -->
<label for="time">Time
  <input type="time" id="time" name="time">

<!-- Color -->
<label for="color">Color
  <input type="color" id="color" name="color" value="#0eaaaa">