Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Customizable Textarea Size in JSON Schema #2734

Open tonygrimstad opened 2 days ago

tonygrimstad commented 2 days ago

Description

We would like to request the ability to define custom sizes for the Textarea field type in JSON schema. This feature would allow developers to specify the expected size of the input area, specially height, directly in the JSON configuration. The goal is to improve the user experience by visually indicating the expected amount of input text. For example, a larger textarea would signal to the user that they are expected to write a more detailed response.

Use Case: When creating forms, certain fields may require long responses, such as feedback forms, comment sections, or descriptions. A small default textarea can be misleading, causing users to feel constrained or unsure about the level of detail they should provide. By enabling customization, developers can better guide the end user and enhance the overall usability of forms.

Additional Notes: If implemented, this feature should gracefully fall back to default dimensions when no custom size is provided, ensuring backward compatibility with existing JSON schemas.

Additional Information

No response