You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: static/llm/forms/input-field.md
+44-17Lines changed: 44 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ On this page you will find all of the input types based on multiple variants, st
17
17
18
18
Use this example as a generic form element which includes multiple input fields types such as text, email, password, number, URL, and phone number and use the grid layout to add multiple columns and rows.
19
19
20
-
```svelte
20
+
```svelte example
21
21
<script>
22
22
import { Input, Label, Helper, Button, Checkbox, A } from "flowbite-svelte";
23
23
</script>
@@ -73,7 +73,7 @@ Use this example as a generic form element which includes multiple input fields
73
73
This example shows how to create an input field where the user can remove the
74
74
text with one click.
75
75
76
-
```svelte
76
+
```svelte example
77
77
<script>
78
78
import { Input } from "flowbite-svelte";
79
79
</script>
@@ -83,7 +83,7 @@ text with one click.
83
83
84
84
## Event
85
85
86
-
```svelte
86
+
```svelte example
87
87
<script>
88
88
import { Input } from "flowbite-svelte";
89
89
</script>
@@ -99,7 +99,7 @@ text with one click.
99
99
100
100
## Accessing Input Element with elementRef
101
101
102
-
```svelte
102
+
```svelte example
103
103
<script lang="ts">
104
104
import { Button, Modal, Input, Label } from "flowbite-svelte";
@@ -322,7 +349,7 @@ This example can be used to add a descriptive icon or additional text inside the
322
349
323
350
This example shows how to add `onclick` event handler to the icon in `Input`. By clicking an icon, it toggles icon and `type`:
324
351
325
-
```svelte
352
+
```svelte example
326
353
<script>
327
354
import { Button, Label, Input, ButtonGroup, InputAddon } from "flowbite-svelte";
328
355
import { EyeOutline, EyeSlashOutline } from "flowbite-svelte-icons";
@@ -366,7 +393,7 @@ This example shows how to add `onclick` event handler to the icon in `Input`. By
366
393
367
394
Use the helper prop to add your helper text. You can use HTML in the helper text.
368
395
369
-
```svelte
396
+
```svelte example
370
397
<script>
371
398
import { Input, Label, Helper } from "flowbite-svelte";
372
399
</script>
@@ -385,7 +412,7 @@ Use the helper prop to add your helper text. You can use HTML in the helper text
385
412
386
413
By default the `Input` component binds the `value` as `string`. If you need a variable bound as `number` you need to use a specialised version of `Input` called `NumberInput`.
387
414
388
-
```svelte
415
+
```svelte example
389
416
<script lang="ts">
390
417
import { Input, Label } from "flowbite-svelte";
391
418
let value = $state(5);
@@ -403,7 +430,7 @@ By default the `Input` component binds the `value` as `string`. If you need a va
403
430
404
431
## Search input
405
432
406
-
```svelte
433
+
```svelte example
407
434
<script>
408
435
import { Input, Label, Button } from "flowbite-svelte";
409
436
import { SearchOutline } from "flowbite-svelte-icons";
@@ -426,7 +453,7 @@ By default the `Input` component binds the `value` as `string`. If you need a va
426
453
427
454
Use this example to show a dropdown menu right next to the input field.
import { ChevronDownOutline, SearchOutline } from "flowbite-svelte-icons";
@@ -453,7 +480,7 @@ Use this example to show a dropdown menu right next to the input field.
453
480
454
481
If you need a full control over `input` HTML element while still re-using the Flowbite formatting, you can put the `input` element as a default slot. The example below is in fact the implementation of the above mentioned `NumberInput`.
455
482
456
-
```svelte
483
+
```svelte example
457
484
<script>
458
485
import { Input } from "flowbite-svelte";
459
486
let value = $state(5);
@@ -469,7 +496,7 @@ If you need a full control over `input` HTML element while still re-using the Fl
0 commit comments