File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,7 @@ pre {
375
375
376
376
.inputForm {
377
377
display : flex;
378
+ align-items : flex-end;
378
379
width : 100% ;
379
380
padding : 10px ;
380
381
padding-bottom : 40px ;
@@ -389,6 +390,11 @@ pre {
389
390
border : 2px solid transparent;
390
391
font-size : 1em ;
391
392
background-color : # efefef ;
393
+ resize : none; /* Prevent manual resize */
394
+ overflow-y : hidden; /* Hide scrollbar */
395
+ min-height : calc (1em + 32px + 4px ); /* font-size + padding + border */
396
+ height : auto; /* Allow it to grow */
397
+ line-height : 1.5 ; /* Adjust for better multi-line readability */
392
398
}
393
399
394
400
.input : focus {
@@ -403,6 +409,7 @@ pre {
403
409
color : white;
404
410
border : none;
405
411
font-size : 1em ;
412
+ height : calc (1em + 32px + 4px ); /* font-size + padding + border */
406
413
border-radius : 60px ; /* Removed duplicate border-radius property */
407
414
}
408
415
Original file line number Diff line number Diff line change 25
25
</ div >
26
26
< form id ="chatForm " class ="inputForm clearfix "
27
27
hx-on::after-request ="this.reset() ">
28
- < input
29
- type ="text "
28
+ < textarea
30
29
class ="input "
31
30
name ="userInput "
32
31
placeholder ="Enter your question "
33
32
id ="userInput "
34
33
autocomplete ="off "
34
+ rows ="1 " {# Start with one row, will expand with CSS #}
35
+ oninput ="this.style.height = 'auto'; this.style.height = (this.scrollHeight) + 'px'; "
35
36
required
36
- / >
37
+ > </ textarea >
37
38
< button
38
39
type ="submit "
39
40
class ="button "
You can’t perform that action at this time.
0 commit comments