x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8"> <!-- Header / Introduction --> <div class="tw-callout"> <p class="tw:mb-1 tw:text-sm tw:font-mono"> <strong>FORM CONTROLS:</strong> Complete reference for all form input components<br> <strong>VARIANTS:</strong> Text Input | Select | Textarea | Checkbox | Radio | Toggle | Validation </p> <p class="tw:mb-0 tw:text-sm"> Form controls are the primary way users enter data into your application. Use consistent styling, clear labels, and helpful validation feedback to guide users through forms efficiently. </p> </div> <!-- Section 1: Text Inputs --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Text Inputs</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Text Inputs:</strong> Basic single-line text entry fields. Use for names, emails, numbers, and other short text data. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="input-default">Default Input</label> <input type="text" class="tw-form-control" id="input-default" placeholder="Enter text..."> </div> <div> <label class="tw-form-label" for="input-filled">Filled Input</label> <input type="text" class="tw-form-control" id="input-filled" value="Filled value"> </div> <div> <label class="tw-form-label" for="input-disabled">Disabled Input</label> <input type="text" class="tw-form-control" id="input-disabled" value="Cannot edit" disabled> </div> <div> <label class="tw-form-label" for="input-readonly">Readonly Input</label> <input type="text" class="tw-form-control" id="input-readonly" value="Read only value" readonly> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input type="text" class="tw-form-control" placeholder="..."></code> </div> </div> <!-- Section 2: Input Sizes --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Input Sizes</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Sizes:</strong> Three size options to match your UI density. Default size works for most cases. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label tw-form-label-sm" for="input-sm">Small Input</label> <input type="text" class="tw-form-control tw-form-control-sm" id="input-sm" placeholder="Small input"> </div> <div> <label class="tw-form-label" for="input-md">Default Input</label> <input type="text" class="tw-form-control" id="input-md" placeholder="Default input"> </div> <div> <label class="tw-form-label tw-form-label-lg" for="input-lg">Large Input</label> <input type="text" class="tw-form-control tw-form-control-lg" id="input-lg" placeholder="Large input"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-control tw-form-control-sm"></code><br> <code><input class="tw-form-control tw-form-control-lg"></code> </div> </div> <!-- Section 3: Labels --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Form Labels</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Labels:</strong> Every form field must have a visible label. Use required/optional indicators to communicate field requirements clearly. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="label-standard">Standard Label</label> <input type="text" class="tw-form-control" id="label-standard" placeholder="Enter value"> </div> <div> <label class="tw-form-label tw-form-label-required" for="label-required">Required Field</label> <input type="text" class="tw-form-control" id="label-required" placeholder="This field is required" aria-required="true"> </div> <div> <label class="tw-form-label tw-form-label-optional" for="label-optional">Optional Field</label> <input type="text" class="tw-form-control" id="label-optional" placeholder="This field is optional"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><label class="tw-form-label">Label</label></code><br> <code><label class="tw-form-label tw-form-label-required">Required</label></code><br> <code><label class="tw-form-label tw-form-label-optional">Optional</label></code> </div> </div> <!-- Section 4: Helper Text & Validation --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Helper Text & Validation</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Feedback:</strong> Use helper text to provide guidance. Validation states visually indicate success or errors with colored borders and feedback messages. </p> </div> <div class="tw:space-y-6 tw:max-w-md"> <!-- Helper text --> <div> <label class="tw-form-label" for="input-helper">With Helper Text</label> <input type="email" class="tw-form-control" id="input-helper" placeholder="name@example.com" aria-describedby="helper-text"> <span class="tw-form-text" id="helper-text">We'll never share your email with anyone else.</span> </div> <!-- Valid state --> <div> <label class="tw-form-label" for="input-valid">Valid Input</label> <input type="text" class="tw-form-control tw-is-valid" id="input-valid" value="Correct value" aria-describedby="valid-feedback"> <span class="tw-valid-feedback" id="valid-feedback">Looks good!</span> </div> <!-- Invalid state --> <div> <label class="tw-form-label tw-form-label-required" for="input-invalid">Invalid Input</label> <input type="text" class="tw-form-control tw-is-invalid" id="input-invalid" value="" aria-describedby="invalid-feedback"> <span class="tw-invalid-feedback" id="invalid-feedback">Please enter a valid value. This field is required.</span> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-control tw-is-valid"></code><br> <code><input class="tw-form-control tw-is-invalid"></code><br> <code><span class="tw-form-text">Helper text</span></code><br> <code><span class="tw-valid-feedback">Success message</span></code><br> <code><span class="tw-invalid-feedback">Error message</span></code> </div> </div> <!-- Section 5: Select Dropdown --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Select Dropdown</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Select:</strong> Dropdown menus for choosing from a list of options. Use when there are more than 5 options or when options are dynamic. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="select-default">Default Select</label> <select class="tw-form-select" id="select-default"> <option selected>Choose an option...</option> <option value="1">Option One</option> <option value="2">Option Two</option> <option value="3">Option Three</option> </select> </div> <div> <label class="tw-form-label" for="select-disabled">Disabled Select</label> <select class="tw-form-select" id="select-disabled" disabled> <option selected>Cannot change</option> <option value="1">Option One</option> </select> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Select Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <select class="tw-form-select tw-form-select-sm"> <option>Small select</option> </select> <select class="tw-form-select"> <option>Default select</option> </select> <select class="tw-form-select tw-form-select-lg"> <option>Large select</option> </select> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Select with Validation</p> <div class="tw:space-y-3 tw:max-w-md"> <div> <select class="tw-form-select tw-is-valid"> <option selected>Valid selection</option> </select> <span class="tw-valid-feedback">Great choice!</span> </div> <div> <select class="tw-form-select tw-is-invalid"> <option selected>Please select...</option> </select> <span class="tw-invalid-feedback">Please make a selection.</span> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><select class="tw-form-select">...</select></code><br> <code><select class="tw-form-select tw-form-select-sm">...</select></code> </div> </div> <!-- Section 6: Textarea --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Textarea</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Textarea:</strong> Multi-line text input for longer content like descriptions, comments, or messages. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="textarea-default">Default Textarea</label> <textarea class="tw-form-control" id="textarea-default" rows="3" placeholder="Enter your message..."></textarea> </div> <div> <label class="tw-form-label" for="textarea-disabled">Disabled Textarea</label> <textarea class="tw-form-control" id="textarea-disabled" rows="3" disabled>Cannot edit this content.</textarea> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Textarea Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <textarea class="tw-form-control tw-form-control-sm" rows="2" placeholder="Small textarea"></textarea> <textarea class="tw-form-control" rows="3" placeholder="Default textarea"></textarea> <textarea class="tw-form-control tw-form-control-lg" rows="4" placeholder="Large textarea"></textarea> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><textarea class="tw-form-control" rows="3"></textarea></code> </div> </div> <!-- Section 7: Checkbox --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Checkbox</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Checkbox:</strong> Use for multiple selections where users can choose one or more options, or for boolean toggles like accepting terms. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check1"> <label class="tw-form-check-label" for="check1">Default checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check2" checked> <label class="tw-form-check-label" for="check2">Checked checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check3" disabled> <label class="tw-form-check-label" for="check3">Disabled checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check4" checked disabled> <label class="tw-form-check-label" for="check4">Disabled checked checkbox</label> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Inline Checkboxes</p> <div class="tw:flex tw:flex-wrap"> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check1" checked> <label class="tw-form-check-label" for="inline-check1">Option 1</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check2"> <label class="tw-form-check-label" for="inline-check2">Option 2</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check3"> <label class="tw-form-check-label" for="inline-check3">Option 3</label> </div> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Checkbox with Validation</p> <div class="tw:space-y-2"> <div class="tw-form-check"> <input class="tw-form-check-input tw-is-valid" type="checkbox" id="check-valid" checked> <label class="tw-form-check-label" for="check-valid">Accepted terms</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input tw-is-invalid" type="checkbox" id="check-invalid"> <label class="tw-form-check-label" for="check-invalid">You must accept the terms</label> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-form-check"></code><br> <code> <input class="tw-form-check-input" type="checkbox" id="..."></code><br> <code> <label class="tw-form-check-label" for="...">Label</label></code><br> <code></div></code> </div> </div> <!-- Section 8: Radio Buttons --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Radio Buttons</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Radio:</strong> Use for single selections where only one option can be chosen from a group. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio1" checked> <label class="tw-form-check-label" for="radio1">Option one is selected</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio2"> <label class="tw-form-check-label" for="radio2">Option two can be selected</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio3" disabled> <label class="tw-form-check-label" for="radio3">Option three is disabled</label> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Inline Radio Buttons</p> <div class="tw:flex tw:flex-wrap"> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio1" checked> <label class="tw-form-check-label" for="inline-radio1">One</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio2"> <label class="tw-form-check-label" for="inline-radio2">Two</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio3"> <label class="tw-form-check-label" for="inline-radio3">Three</label> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-check-input" type="radio" name="group" id="..."></code> </div> </div> <!-- Section 9: Toggle Switch --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Toggle Switch</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Toggle:</strong> Binary on/off controls for settings and preferences. Use instead of checkboxes when the action takes immediate effect. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch1"> <label class="tw-form-check-label" for="switch1">Enable notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch2" checked> <label class="tw-form-check-label" for="switch2">Dark mode enabled</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch3" disabled> <label class="tw-form-check-label" for="switch3">Disabled toggle</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch4" checked disabled> <label class="tw-form-check-label" for="switch4">Disabled on toggle</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch5"> <div> <label class="tw-form-check-label" for="switch5">Compact view</label> <span class="tw-form-text">Keep everything neat and tidy to show even more content</span> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-form-switch"></code><br> <code> <input class="tw-form-check-input" type="checkbox" id="..."></code><br> <code> <label class="tw-form-check-label" for="...">Label</label></code><br> <code></div></code> </div> </div> <!-- Section 10: Input Groups --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Input Groups</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Input Groups:</strong> Combine inputs with text addons, icons, or buttons for contextual input fields. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label">With Text Addon</label> <div class="tw-input-group"> <span class="tw-input-group-text">@</span> <input type="text" class="tw-form-control" placeholder="Username"> </div> </div> <div> <label class="tw-form-label">With Suffix</label> <div class="tw-input-group"> <input type="text" class="tw-form-control" placeholder="Amount"> <span class="tw-input-group-text">.00</span> </div> </div> <div> <label class="tw-form-label">With Both</label> <div class="tw-input-group"> <span class="tw-input-group-text">$</span> <input type="text" class="tw-form-control" placeholder="0"> <span class="tw-input-group-text">.00</span> </div> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Input Group Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <div class="tw-input-group tw-input-group-sm"> <span class="tw-input-group-text">Small</span> <input type="text" class="tw-form-control" placeholder="Small input group"> </div> <div class="tw-input-group"> <span class="tw-input-group-text">Default</span> <input type="text" class="tw-form-control" placeholder="Default input group"> </div> <div class="tw-input-group tw-input-group-lg"> <span class="tw-input-group-text">Large</span> <input type="text" class="tw-form-control" placeholder="Large input group"> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-input-group"></code><br> <code> <span class="tw-input-group-text">@</span></code><br> <code> <input class="tw-form-control"></code><br> <code></div></code> </div> </div> <!-- Section 11: Plaintext Display --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Plaintext Display</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Plaintext:</strong> Display form values as plain text when in read-only mode while maintaining form layout alignment. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="plaintext-email">Email Address</label> <input type="text" readonly class="tw-form-control-plaintext" id="plaintext-email" value="john.doe@example.com"> </div> <div> <label class="tw-form-label" for="plaintext-name">Full Name</label> <input type="text" readonly class="tw-form-control-plaintext" id="plaintext-name" value="John Doe"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input type="text" readonly class="tw-form-control-plaintext" value="..."></code> </div> </div> <!-- Section 12: Common Form Patterns --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Common Form Patterns</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Real-world examples:</strong> Typical form layouts and patterns you'll use in your application. </p> </div> <div class="tw:space-y-8"> <!-- Login Form --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Login Form</p> <div class="tw-card tw:max-w-sm"> <div class="tw-card-body"> <h3 class="tw-card-title">Sign In</h3> <div class="tw:space-y-3"> <div> <label class="tw-form-label tw-form-label-required" for="login-email">Email</label> <input type="email" class="tw-form-control" id="login-email" placeholder="name@example.com"> </div> <div> <label class="tw-form-label tw-form-label-required" for="login-password">Password</label> <input type="password" class="tw-form-control" id="login-password" placeholder="Enter password"> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="login-remember"> <label class="tw-form-check-label" for="login-remember">Remember me</label> </div> <button type="submit" class="tw-btn tw-btn-primary tw-btn-block">Sign In</button> </div> </div> </div> </div> <!-- Contact Form --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Contact Form</p> <div class="tw-card tw:max-w-lg"> <div class="tw-card-body"> <h3 class="tw-card-title">Contact Us</h3> <div class="tw:space-y-3"> <div class="tw:grid tw:grid-cols-2 tw:gap-3"> <div> <label class="tw-form-label tw-form-label-required" for="contact-first">First Name</label> <input type="text" class="tw-form-control" id="contact-first" placeholder="John"> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-last">Last Name</label> <input type="text" class="tw-form-control" id="contact-last" placeholder="Doe"> </div> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-email">Email</label> <input type="email" class="tw-form-control" id="contact-email" placeholder="john@example.com"> </div> <div> <label class="tw-form-label" for="contact-subject">Subject</label> <select class="tw-form-select" id="contact-subject"> <option selected>Choose a topic...</option> <option>General Inquiry</option> <option>Technical Support</option> <option>Billing Question</option> </select> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-message">Message</label> <textarea class="tw-form-control" id="contact-message" rows="4" placeholder="How can we help?"></textarea> </div> <div class="tw:flex tw:gap-2"> <button type="submit" class="tw-btn tw-btn-primary">Send Message</button> <button type="button" class="tw-btn tw-btn-secondary">Cancel</button> </div> </div> </div> </div> </div> <!-- Settings Form with Toggles --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Settings with Toggles</p> <div class="tw-card tw:max-w-md"> <div class="tw-card-header">Notification Preferences</div> <div class="tw-card-body"> <div class="tw:space-y-4"> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-email" checked> <label class="tw-form-check-label" for="setting-email">Email notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-sms"> <label class="tw-form-check-label" for="setting-sms">SMS notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-push" checked> <label class="tw-form-check-label" for="setting-push">Push notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-marketing"> <label class="tw-form-check-label" for="setting-marketing">Marketing emails</label> </div> </div> </div> <div class="tw-card-footer"> <button type="button" class="tw-btn tw-btn-primary tw-btn-sm">Save Preferences</button> </div> </div> </div> </div> </div> <!-- Quick Reference Footer --> <div class="tw:border-t tw:pt-6 tw:mt-8"> <div class="tw-callout"> <p class="tw:mb-1 tw:text-sm tw:font-semibold">Quick Reference</p> <p class="tw:mb-0 tw:text-xs tw:font-mono"> <strong>Text Input:</strong> .tw-form-control<br> <strong>Select:</strong> .tw-form-select<br> <strong>Sizes:</strong> .tw-form-control-sm | .tw-form-control-lg | .tw-form-select-sm | .tw-form-select-lg<br> <strong>Validation:</strong> .tw-is-valid | .tw-is-invalid<br> <strong>Labels:</strong> .tw-form-label | .tw-form-label-required | .tw-form-label-optional | .tw-form-label-sm | .tw-form-label-lg<br> <strong>Feedback:</strong> .tw-form-text | .tw-valid-feedback | .tw-invalid-feedback<br> <strong>Checkbox/Radio:</strong> .tw-form-check > .tw-form-check-input + .tw-form-check-label<br> <strong>Inline:</strong> .tw-form-check-inline<br> <strong>Toggle:</strong> .tw-form-switch > .tw-form-check-input + .tw-form-check-label<br> <strong>Input Group:</strong> .tw-input-group > .tw-input-group-text + .tw-form-control<br> <strong>Input Group Sizes:</strong> .tw-input-group-sm | .tw-input-group-lg<br> <strong>Plaintext:</strong> .tw-form-control-plaintext<br> <strong>States:</strong> disabled attribute | readonly attribute </p> </div> </div></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8"> <!-- Header / Introduction --> <div class="tw-callout"> <p class="tw:mb-1 tw:text-sm tw:font-mono"> <strong>FORM CONTROLS:</strong> Complete reference for all form input components<br> <strong>VARIANTS:</strong> Text Input | Select | Textarea | Checkbox | Radio | Toggle | Validation </p> <p class="tw:mb-0 tw:text-sm"> Form controls are the primary way users enter data into your application. Use consistent styling, clear labels, and helpful validation feedback to guide users through forms efficiently. </p> </div> <!-- Section 1: Text Inputs --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Text Inputs</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Text Inputs:</strong> Basic single-line text entry fields. Use for names, emails, numbers, and other short text data. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="input-default">Default Input</label> <input type="text" class="tw-form-control" id="input-default" placeholder="Enter text..."> </div> <div> <label class="tw-form-label" for="input-filled">Filled Input</label> <input type="text" class="tw-form-control" id="input-filled" value="Filled value"> </div> <div> <label class="tw-form-label" for="input-disabled">Disabled Input</label> <input type="text" class="tw-form-control" id="input-disabled" value="Cannot edit" disabled> </div> <div> <label class="tw-form-label" for="input-readonly">Readonly Input</label> <input type="text" class="tw-form-control" id="input-readonly" value="Read only value" readonly> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input type="text" class="tw-form-control" placeholder="..."></code> </div> </div> <!-- Section 2: Input Sizes --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Input Sizes</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Sizes:</strong> Three size options to match your UI density. Default size works for most cases. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label tw-form-label-sm" for="input-sm">Small Input</label> <input type="text" class="tw-form-control tw-form-control-sm" id="input-sm" placeholder="Small input"> </div> <div> <label class="tw-form-label" for="input-md">Default Input</label> <input type="text" class="tw-form-control" id="input-md" placeholder="Default input"> </div> <div> <label class="tw-form-label tw-form-label-lg" for="input-lg">Large Input</label> <input type="text" class="tw-form-control tw-form-control-lg" id="input-lg" placeholder="Large input"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-control tw-form-control-sm"></code><br> <code><input class="tw-form-control tw-form-control-lg"></code> </div> </div> <!-- Section 3: Labels --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Form Labels</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Labels:</strong> Every form field must have a visible label. Use required/optional indicators to communicate field requirements clearly. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="label-standard">Standard Label</label> <input type="text" class="tw-form-control" id="label-standard" placeholder="Enter value"> </div> <div> <label class="tw-form-label tw-form-label-required" for="label-required">Required Field</label> <input type="text" class="tw-form-control" id="label-required" placeholder="This field is required" aria-required="true"> </div> <div> <label class="tw-form-label tw-form-label-optional" for="label-optional">Optional Field</label> <input type="text" class="tw-form-control" id="label-optional" placeholder="This field is optional"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><label class="tw-form-label">Label</label></code><br> <code><label class="tw-form-label tw-form-label-required">Required</label></code><br> <code><label class="tw-form-label tw-form-label-optional">Optional</label></code> </div> </div> <!-- Section 4: Helper Text & Validation --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Helper Text & Validation</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Feedback:</strong> Use helper text to provide guidance. Validation states visually indicate success or errors with colored borders and feedback messages. </p> </div> <div class="tw:space-y-6 tw:max-w-md"> <!-- Helper text --> <div> <label class="tw-form-label" for="input-helper">With Helper Text</label> <input type="email" class="tw-form-control" id="input-helper" placeholder="name@example.com" aria-describedby="helper-text"> <span class="tw-form-text" id="helper-text">We'll never share your email with anyone else.</span> </div> <!-- Valid state --> <div> <label class="tw-form-label" for="input-valid">Valid Input</label> <input type="text" class="tw-form-control tw-is-valid" id="input-valid" value="Correct value" aria-describedby="valid-feedback"> <span class="tw-valid-feedback" id="valid-feedback">Looks good!</span> </div> <!-- Invalid state --> <div> <label class="tw-form-label tw-form-label-required" for="input-invalid">Invalid Input</label> <input type="text" class="tw-form-control tw-is-invalid" id="input-invalid" value="" aria-describedby="invalid-feedback"> <span class="tw-invalid-feedback" id="invalid-feedback">Please enter a valid value. This field is required.</span> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-control tw-is-valid"></code><br> <code><input class="tw-form-control tw-is-invalid"></code><br> <code><span class="tw-form-text">Helper text</span></code><br> <code><span class="tw-valid-feedback">Success message</span></code><br> <code><span class="tw-invalid-feedback">Error message</span></code> </div> </div> <!-- Section 5: Select Dropdown --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Select Dropdown</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Select:</strong> Dropdown menus for choosing from a list of options. Use when there are more than 5 options or when options are dynamic. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="select-default">Default Select</label> <select class="tw-form-select" id="select-default"> <option selected>Choose an option...</option> <option value="1">Option One</option> <option value="2">Option Two</option> <option value="3">Option Three</option> </select> </div> <div> <label class="tw-form-label" for="select-disabled">Disabled Select</label> <select class="tw-form-select" id="select-disabled" disabled> <option selected>Cannot change</option> <option value="1">Option One</option> </select> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Select Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <select class="tw-form-select tw-form-select-sm"> <option>Small select</option> </select> <select class="tw-form-select"> <option>Default select</option> </select> <select class="tw-form-select tw-form-select-lg"> <option>Large select</option> </select> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Select with Validation</p> <div class="tw:space-y-3 tw:max-w-md"> <div> <select class="tw-form-select tw-is-valid"> <option selected>Valid selection</option> </select> <span class="tw-valid-feedback">Great choice!</span> </div> <div> <select class="tw-form-select tw-is-invalid"> <option selected>Please select...</option> </select> <span class="tw-invalid-feedback">Please make a selection.</span> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><select class="tw-form-select">...</select></code><br> <code><select class="tw-form-select tw-form-select-sm">...</select></code> </div> </div> <!-- Section 6: Textarea --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Textarea</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Textarea:</strong> Multi-line text input for longer content like descriptions, comments, or messages. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="textarea-default">Default Textarea</label> <textarea class="tw-form-control" id="textarea-default" rows="3" placeholder="Enter your message..."></textarea> </div> <div> <label class="tw-form-label" for="textarea-disabled">Disabled Textarea</label> <textarea class="tw-form-control" id="textarea-disabled" rows="3" disabled>Cannot edit this content.</textarea> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Textarea Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <textarea class="tw-form-control tw-form-control-sm" rows="2" placeholder="Small textarea"></textarea> <textarea class="tw-form-control" rows="3" placeholder="Default textarea"></textarea> <textarea class="tw-form-control tw-form-control-lg" rows="4" placeholder="Large textarea"></textarea> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><textarea class="tw-form-control" rows="3"></textarea></code> </div> </div> <!-- Section 7: Checkbox --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Checkbox</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Checkbox:</strong> Use for multiple selections where users can choose one or more options, or for boolean toggles like accepting terms. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check1"> <label class="tw-form-check-label" for="check1">Default checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check2" checked> <label class="tw-form-check-label" for="check2">Checked checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check3" disabled> <label class="tw-form-check-label" for="check3">Disabled checkbox</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="check4" checked disabled> <label class="tw-form-check-label" for="check4">Disabled checked checkbox</label> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Inline Checkboxes</p> <div class="tw:flex tw:flex-wrap"> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check1" checked> <label class="tw-form-check-label" for="inline-check1">Option 1</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check2"> <label class="tw-form-check-label" for="inline-check2">Option 2</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="checkbox" id="inline-check3"> <label class="tw-form-check-label" for="inline-check3">Option 3</label> </div> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Checkbox with Validation</p> <div class="tw:space-y-2"> <div class="tw-form-check"> <input class="tw-form-check-input tw-is-valid" type="checkbox" id="check-valid" checked> <label class="tw-form-check-label" for="check-valid">Accepted terms</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input tw-is-invalid" type="checkbox" id="check-invalid"> <label class="tw-form-check-label" for="check-invalid">You must accept the terms</label> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-form-check"></code><br> <code> <input class="tw-form-check-input" type="checkbox" id="..."></code><br> <code> <label class="tw-form-check-label" for="...">Label</label></code><br> <code></div></code> </div> </div> <!-- Section 8: Radio Buttons --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Radio Buttons</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Radio:</strong> Use for single selections where only one option can be chosen from a group. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio1" checked> <label class="tw-form-check-label" for="radio1">Option one is selected</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio2"> <label class="tw-form-check-label" for="radio2">Option two can be selected</label> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="radio" name="radioGroup" id="radio3" disabled> <label class="tw-form-check-label" for="radio3">Option three is disabled</label> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Inline Radio Buttons</p> <div class="tw:flex tw:flex-wrap"> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio1" checked> <label class="tw-form-check-label" for="inline-radio1">One</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio2"> <label class="tw-form-check-label" for="inline-radio2">Two</label> </div> <div class="tw-form-check-inline"> <input class="tw-form-check-input" type="radio" name="inlineRadio" id="inline-radio3"> <label class="tw-form-check-label" for="inline-radio3">Three</label> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input class="tw-form-check-input" type="radio" name="group" id="..."></code> </div> </div> <!-- Section 9: Toggle Switch --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Toggle Switch</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Toggle:</strong> Binary on/off controls for settings and preferences. Use instead of checkboxes when the action takes immediate effect. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch1"> <label class="tw-form-check-label" for="switch1">Enable notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch2" checked> <label class="tw-form-check-label" for="switch2">Dark mode enabled</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch3" disabled> <label class="tw-form-check-label" for="switch3">Disabled toggle</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch4" checked disabled> <label class="tw-form-check-label" for="switch4">Disabled on toggle</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="switch5"> <div> <label class="tw-form-check-label" for="switch5">Compact view</label> <span class="tw-form-text">Keep everything neat and tidy to show even more content</span> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-form-switch"></code><br> <code> <input class="tw-form-check-input" type="checkbox" id="..."></code><br> <code> <label class="tw-form-check-label" for="...">Label</label></code><br> <code></div></code> </div> </div> <!-- Section 10: Input Groups --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Input Groups</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Input Groups:</strong> Combine inputs with text addons, icons, or buttons for contextual input fields. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label">With Text Addon</label> <div class="tw-input-group"> <span class="tw-input-group-text">@</span> <input type="text" class="tw-form-control" placeholder="Username"> </div> </div> <div> <label class="tw-form-label">With Suffix</label> <div class="tw-input-group"> <input type="text" class="tw-form-control" placeholder="Amount"> <span class="tw-input-group-text">.00</span> </div> </div> <div> <label class="tw-form-label">With Both</label> <div class="tw-input-group"> <span class="tw-input-group-text">$</span> <input type="text" class="tw-form-control" placeholder="0"> <span class="tw-input-group-text">.00</span> </div> </div> </div> <div class="tw:mt-4"> <p class="tw:text-sm tw:font-semibold tw:mb-3">Input Group Sizes</p> <div class="tw:space-y-3 tw:max-w-md"> <div class="tw-input-group tw-input-group-sm"> <span class="tw-input-group-text">Small</span> <input type="text" class="tw-form-control" placeholder="Small input group"> </div> <div class="tw-input-group"> <span class="tw-input-group-text">Default</span> <input type="text" class="tw-form-control" placeholder="Default input group"> </div> <div class="tw-input-group tw-input-group-lg"> <span class="tw-input-group-text">Large</span> <input type="text" class="tw-form-control" placeholder="Large input group"> </div> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><div class="tw-input-group"></code><br> <code> <span class="tw-input-group-text">@</span></code><br> <code> <input class="tw-form-control"></code><br> <code></div></code> </div> </div> <!-- Section 11: Plaintext Display --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Plaintext Display</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Plaintext:</strong> Display form values as plain text when in read-only mode while maintaining form layout alignment. </p> </div> <div class="tw:space-y-4 tw:max-w-md"> <div> <label class="tw-form-label" for="plaintext-email">Email Address</label> <input type="text" readonly class="tw-form-control-plaintext" id="plaintext-email" value="john.doe@example.com"> </div> <div> <label class="tw-form-label" for="plaintext-name">Full Name</label> <input type="text" readonly class="tw-form-control-plaintext" id="plaintext-name" value="John Doe"> </div> </div> <div class="tw:mt-4 tw:text-sm tw:text-gray-600"> <code><input type="text" readonly class="tw-form-control-plaintext" value="..."></code> </div> </div> <!-- Section 12: Common Form Patterns --> <div class="tw:border-t tw:pt-6"> <h2 class="tw-h4 tw:mb-4">Common Form Patterns</h2> <div class="tw-callout tw:mb-4"> <p class="tw:mb-0 tw:text-sm"> <strong>Real-world examples:</strong> Typical form layouts and patterns you'll use in your application. </p> </div> <div class="tw:space-y-8"> <!-- Login Form --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Login Form</p> <div class="tw-card tw:max-w-sm"> <div class="tw-card-body"> <h3 class="tw-card-title">Sign In</h3> <div class="tw:space-y-3"> <div> <label class="tw-form-label tw-form-label-required" for="login-email">Email</label> <input type="email" class="tw-form-control" id="login-email" placeholder="name@example.com"> </div> <div> <label class="tw-form-label tw-form-label-required" for="login-password">Password</label> <input type="password" class="tw-form-control" id="login-password" placeholder="Enter password"> </div> <div class="tw-form-check"> <input class="tw-form-check-input" type="checkbox" id="login-remember"> <label class="tw-form-check-label" for="login-remember">Remember me</label> </div> <button type="submit" class="tw-btn tw-btn-primary tw-btn-block">Sign In</button> </div> </div> </div> </div> <!-- Contact Form --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Contact Form</p> <div class="tw-card tw:max-w-lg"> <div class="tw-card-body"> <h3 class="tw-card-title">Contact Us</h3> <div class="tw:space-y-3"> <div class="tw:grid tw:grid-cols-2 tw:gap-3"> <div> <label class="tw-form-label tw-form-label-required" for="contact-first">First Name</label> <input type="text" class="tw-form-control" id="contact-first" placeholder="John"> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-last">Last Name</label> <input type="text" class="tw-form-control" id="contact-last" placeholder="Doe"> </div> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-email">Email</label> <input type="email" class="tw-form-control" id="contact-email" placeholder="john@example.com"> </div> <div> <label class="tw-form-label" for="contact-subject">Subject</label> <select class="tw-form-select" id="contact-subject"> <option selected>Choose a topic...</option> <option>General Inquiry</option> <option>Technical Support</option> <option>Billing Question</option> </select> </div> <div> <label class="tw-form-label tw-form-label-required" for="contact-message">Message</label> <textarea class="tw-form-control" id="contact-message" rows="4" placeholder="How can we help?"></textarea> </div> <div class="tw:flex tw:gap-2"> <button type="submit" class="tw-btn tw-btn-primary">Send Message</button> <button type="button" class="tw-btn tw-btn-secondary">Cancel</button> </div> </div> </div> </div> </div> <!-- Settings Form with Toggles --> <div> <p class="tw:text-sm tw:font-semibold tw:mb-3">Settings with Toggles</p> <div class="tw-card tw:max-w-md"> <div class="tw-card-header">Notification Preferences</div> <div class="tw-card-body"> <div class="tw:space-y-4"> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-email" checked> <label class="tw-form-check-label" for="setting-email">Email notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-sms"> <label class="tw-form-check-label" for="setting-sms">SMS notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-push" checked> <label class="tw-form-check-label" for="setting-push">Push notifications</label> </div> <div class="tw-form-switch"> <input class="tw-form-check-input" type="checkbox" id="setting-marketing"> <label class="tw-form-check-label" for="setting-marketing">Marketing emails</label> </div> </div> </div> <div class="tw-card-footer"> <button type="button" class="tw-btn tw-btn-primary tw-btn-sm">Save Preferences</button> </div> </div> </div> </div> </div> <!-- Quick Reference Footer --> <div class="tw:border-t tw:pt-6 tw:mt-8"> <div class="tw-callout"> <p class="tw:mb-1 tw:text-sm tw:font-semibold">Quick Reference</p> <p class="tw:mb-0 tw:text-xs tw:font-mono"> <strong>Text Input:</strong> .tw-form-control<br> <strong>Select:</strong> .tw-form-select<br> <strong>Sizes:</strong> .tw-form-control-sm | .tw-form-control-lg | .tw-form-select-sm | .tw-form-select-lg<br> <strong>Validation:</strong> .tw-is-valid | .tw-is-invalid<br> <strong>Labels:</strong> .tw-form-label | .tw-form-label-required | .tw-form-label-optional | .tw-form-label-sm | .tw-form-label-lg<br> <strong>Feedback:</strong> .tw-form-text | .tw-valid-feedback | .tw-invalid-feedback<br> <strong>Checkbox/Radio:</strong> .tw-form-check > .tw-form-check-input + .tw-form-check-label<br> <strong>Inline:</strong> .tw-form-check-inline<br> <strong>Toggle:</strong> .tw-form-switch > .tw-form-check-input + .tw-form-check-label<br> <strong>Input Group:</strong> .tw-input-group > .tw-input-group-text + .tw-form-control<br> <strong>Input Group Sizes:</strong> .tw-input-group-sm | .tw-input-group-lg<br> <strong>Plaintext:</strong> .tw-form-control-plaintext<br> <strong>States:</strong> disabled attribute | readonly attribute </p> </div> </div></div>No notes provided.
No params configured.