{
  "id": "F03",
  "title": "Form in every width",
  "topic": "forms",
  "use": "The same form in every width. The divider can be dragged freely, and the rows work out their column count on their own — four short fields side by side become two, and on a narrow screen every field stands on a line of its own.",
  "decisions": [
    "Rows work out their column count from the width the form gets, not from the screen: the form carries no media query, so it behaves the same in a split layout, a drawer, a dialog, a narrower window or a smaller device.",
    "The steps are measured on the form's own container: from 38rem four short fields stand on one line, from 25rem two, and below that every field has a line of its own.",
    "Each field names its span per step (ed-span-sm-6, ed-span-md-3), and the grid does the rest.",
    "On a wide screen the form stops at 64rem, as in F01, F02 and F05: the empty space beside it is intended, not a gap to fill."
  ],
  "try": [
    {
      "do": "Drag the divider slowly to the left",
      "then": "once the form is narrower than 608 pixels, the four numbers stand two to a line, and the street and the house number, the postcode and the city each split their line in halves"
    },
    {
      "do": "Keep dragging until the form is narrower than 400 pixels",
      "then": "the form turns into a single column, one field to a line"
    },
    {
      "do": "Drag the divider to the right again",
      "then": "the rows take their columns back in the same steps; once the form is 608 pixels wide, the fields only grow wider"
    }
  ],
  "revision": 1,
  "changes": [],
  "reviewed": true,
  "source": "<!-- Demo only, not part of the pattern. The form takes the width its container gives it; the split panel around it here only lets you change that width. -->\n\n<form class=\"ed-stack ed-gap-6\" style=\"max-inline-size: 64rem\">\n  <div class=\"ed-grid\">\n    <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"client\" label=\"Client number\" value=\"104733\" required></ed-input>\n    <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"legalForm\" label=\"Legal form\" value=\"gmbh-co-kg\" required>\n      <ed-option value=\"sole\">Sole proprietorship</ed-option>\n      <ed-option value=\"gmbh\">GmbH</ed-option>\n      <ed-option value=\"gmbh-co-kg\">GmbH &amp; Co. KG</ed-option>\n    </ed-select>\n    <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"taxNumber\" label=\"Tax number\" value=\"040/815/12345\"></ed-input>\n    <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"vatId\" label=\"VAT ID\" value=\"DE812345678\"></ed-input>\n  </div>\n\n  <div class=\"ed-grid\">\n    <ed-input class=\"ed-span-sm-6\" name=\"company\" label=\"Company name\" value=\"Bergmann &amp; Söhne Fahrzeugtechnik\" required></ed-input>\n    <ed-input class=\"ed-span-sm-6\" name=\"shortName\" label=\"Short name\" value=\"Bergmann Fahrzeugtechnik\"></ed-input>\n  </div>\n\n  <div class=\"ed-grid\">\n    <ed-input class=\"ed-span-sm-6 ed-span-md-9\" name=\"street\" label=\"Street\" value=\"Untertürkheimer Straße\" required></ed-input>\n    <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"houseNumber\" label=\"House number\" value=\"47\" required></ed-input>\n  </div>\n\n  <div class=\"ed-grid\">\n    <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"postcode\" label=\"Postcode\" value=\"66117\" maxlength=\"5\" required></ed-input>\n    <ed-input class=\"ed-span-sm-6 ed-span-md-9\" name=\"city\" label=\"City\" value=\"Saarbrücken\" required></ed-input>\n  </div>\n\n  <div class=\"ed-grid\">\n    <ed-date-picker class=\"ed-span-md-4\" name=\"fiscalYearStart\" label=\"Start\" value=\"2026-01-01\" required></ed-date-picker>\n    <ed-date-picker class=\"ed-span-md-4\" name=\"fiscalYearEnd\" label=\"End\" value=\"2026-12-31\" required></ed-date-picker>\n    <ed-select class=\"ed-span-md-4\" name=\"billingCycle\" label=\"Billing cycle\" value=\"monthly\" required>\n      <ed-option value=\"monthly\">Monthly</ed-option>\n      <ed-option value=\"quarterly\">Quarterly</ed-option>\n      <ed-option value=\"annually\">Annually</ed-option>\n    </ed-select>\n  </div>\n\n  <div class=\"ed-grid\">\n    <ed-textarea class=\"ed-span-grid\" name=\"notes\" label=\"Notes\" rows=\"2\"></ed-textarea>\n  </div>\n</form>",
  "page": "https://test-apps.eurodata.de/a/eurodata-ui/docs/patterns/forms/f03-form-in-every-width/",
  "topicPage": "https://test-apps.eurodata.de/a/eurodata-ui/docs/patterns/forms/"
}
