> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/topicos/converter/formularios/formularios-duvidas-comuns/formularios-como-criar-campos-responsivos-nos-formularios.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

# Formulários - Como criar campos responsivos nos formulários

Uma forma de melhorar a experiência dos usuários é criar campos responsivos nos seus formulários, pois eles se adaptam ao tamanho da tela e facilitam a visualização.

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FSSkKjpSH8jWWqiSZUjtU%2Fimage.png?alt=media&amp;token=04dbc541-08c9-4df8-8d4e-23585ca527f0" alt=""><figcaption></figcaption></figure>

Veja como criar um botão responsivo no exemplo abaixo, usando o botão **Enviar** como referência:

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FICO8YHLaVCc1njq83jso%2F2024-03-30_10h46_561.png?alt=media&amp;token=e45d0ad5-2dab-485f-8e7b-75ea2eb86cff" alt=""><figcaption><p>Ele se adapta ao tamanho da tela do lead.</p></figcaption></figure>

Acesse a página de Criação de Formulários e clique no botão **ENVIAR** e depois na opção **DIMENSÕES**.

Note que a unidade de medida selecionada é o Pixel, que é uma unidade estática, ou seja, que não se adapta corretamente aos diversos tamanhos de tela dos dispositivos que os usuários podem usar.

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FieqRT8YcXkjqVAviFT2O%2F2024-03-30_10h44_42.png?alt=media&amp;token=af1b9f85-c303-498e-a6d8-49dea058590c" alt=""><figcaption><p>Botão que usaremos como exemplo.</p></figcaption></figure>

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FtIiTOCSXB7zvsuvBHmzW%2F2024-03-30_10h45_09.png?alt=media&amp;token=a2149822-4bee-4579-a150-8ac58107b8b6" alt=""><figcaption><p>O mesmo procedimento pode ser feito para outros componentes.</p></figcaption></figure>

Na seleção de medias você encontrará **outras** opções, mas a **melhor** opção para esse caso é usar a unidade de medida de **Porcentagem**, pois ela é uma unidade dinâmica que se ajusta às telas dos usuários. É **importante** manter a largura em **100%**.

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F5ivdYRd383YfbnA7D8p3%2F2024-03-30_10h46_41.png?alt=media&amp;token=524c1af5-e22c-4f50-82a6-ec1bcfc0bed3" alt=""><figcaption></figcaption></figure>

Observe que o botão Enviar se **ajusta** as bordas do formulário!

Para verificar como o botão ficará nas diferentes telas, nós oferecemos a opção de Visualização em Formato para tablet, celular e computador. Assim você poderá ter uma ideia de como será o resultado final.

<figure><img src="https://3534414179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FVMLClPGFHGvapdJ6iAZo%2F2024-03-30_10h46_56.png?alt=media&amp;token=3e922935-504d-43b8-9f54-efb9a6c62e1c" alt=""><figcaption><p>O mesmo pode ser feito para tablets e outros formatos de tela.</p></figcaption></figure>

*Agora seu botão já está pronto para se adaptar às diferentes telas.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sprinthub.com/topicos/converter/formularios/formularios-duvidas-comuns/formularios-como-criar-campos-responsivos-nos-formularios.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
