--- layout: layouts/page.njk title: Input description: Displays a form input field or a component that looks like an input field. toc: - label: Usage id: usage --- {% from "macros/code_preview.njk" import code_preview %} {% from "macros/code_block.njk" import code_block %} {% set code %}
{% endset %} {{ code_preview("input", code, "w-full max-w-sm") }}Adding the form class to the parent of any form element (<label>, <input>, <textarea>, <select>) will automatically apply the style you would get from adding label, input, textarea, or select classes. Read more about Label, Input, Textarea, and Select.