@@ -37,6 +37,9 @@ def textarea(
3737
3838 Args:
3939 label: Label for input.
40+ autosize: If True, the textarea will automatically adjust its height to fit the content, up to the max_rows limit.
41+ min_rows: The minimum number of rows the textarea will display.
42+ max_rows: The maximum number of rows the textarea will display.
4043 on_input: [input](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event) is a native browser event.
4144 rows: The number of lines to show in the text area.
4245 appearance: The form field appearance style.
@@ -63,7 +66,7 @@ def textarea(
6366 min_rows = min_rows ,
6467 max_rows = max_rows ,
6568 is_textarea = True ,
66- is_native_input = False ,
69+ is_native_textarea = False ,
6770 disabled = disabled ,
6871 placeholder = placeholder ,
6972 required = required ,
@@ -145,7 +148,7 @@ def input(
145148 type_name = "input" ,
146149 proto = input_pb .InputType (
147150 is_textarea = False ,
148- is_native_input = False ,
151+ is_native_textarea = False ,
149152 disabled = disabled ,
150153 placeholder = placeholder ,
151154 required = required ,
@@ -167,37 +170,26 @@ def input(
167170 )
168171
169172
170- def native_input (
173+ def native_textarea (
171174 * ,
172175 on_input : Callable [[InputEvent ], Any ] | None = None ,
173- type : Literal [
174- "color" ,
175- "date" ,
176- "datetime-local" ,
177- "email" ,
178- "month" ,
179- "number" ,
180- "password" ,
181- "search" ,
182- "tel" ,
183- "text" ,
184- "time" ,
185- "url" ,
186- "week" ,
187- ]
188- | None = None ,
176+ autosize : bool = False ,
177+ min_rows : int | None = None ,
178+ max_rows : int | None = None ,
189179 style : Style | None = None ,
190180 disabled : bool = False ,
191181 placeholder : str = "" ,
192182 value : str = "" ,
193183 readonly : bool = False ,
194184 key : str | None = None ,
195185):
196- """Creates a browser native Input component. Intended for advanced use cases with maximum UI control.
186+ """Creates a browser native Textarea component. Intended for advanced use cases with maximum UI control.
197187
198188 Args:
199189 on_input: [input](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event) is a native browser event.
200- type: Input type of the element. For textarea, use `me.Textarea(...)`
190+ autosize: If True, the textarea will automatically adjust its height to fit the content, up to the max_rows limit.
191+ min_rows: The minimum number of rows the textarea will display.
192+ max_rows: The maximum number of rows the textarea will display.
201193 style: Style for input.
202194 disabled: Whether it's disabled.
203195 placeholder: Placeholder value
@@ -211,10 +203,12 @@ def native_input(
211203 type_name = "input" ,
212204 proto = input_pb .InputType (
213205 is_textarea = False ,
214- is_native_input = True ,
206+ is_native_textarea = True ,
207+ autosize = autosize ,
208+ min_rows = min_rows ,
209+ max_rows = max_rows ,
215210 disabled = disabled ,
216211 placeholder = placeholder ,
217- type = type ,
218212 value = value ,
219213 readonly = readonly ,
220214 on_input_handler_id = register_event_handler (on_input , event = InputEvent )
0 commit comments