
Input / Form Elements React Components
Form elements allow you to create flexible and beautiful Form layout. Form elements are just well known List View (List and List Item React components) but with few additional components.
Check out Framework7’s Inputs / Form Elements for their appearance.
Input Components
There are following components included:
**ListInput**/**F7ListInput**- list item input element**Input**/**F7Input**- input element
Input Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| <ListInput> properties | |||
| --- | --- | --- | --- |
| id | string | Wrapping element ID attribute | |
| media | string | List item media image URL | |
| label | string | Input’s label text | |
| inlineLabel | boolean | false | Makes label inline |
| floatingLabel | boolean | false | Enables floating label |
| outline | boolean | false | Makes input outline |
| input | boolean | true | Whether it should render input element or not. Disable if you want to use custom input inside. |
| type | string | Input type. All default HTML5 input type, and few special ones: - textarea - to render textarea element - select - to render select element - datepicker - to open Calendar on input focus - colorpicker - to open Color Picker on input focus | |
| resizable | boolean | false | Makes textarea resizable |
| inputStyle | object | Value of input’s “style” attribute, in case you need to pass extra styles | |
| clearButton | boolean | false | Adds input clear button that will clear input value on click |
| validate | boolean | false | When enabled then input value will be validated on change based on passed “pattern” or based on input type. If you use custom validation and need more control on where to show/hide error message, then it is better to disable validation and use error-message together with error-message-force props. |
| validateOnBlur | boolean | false | When enabled then input will be validated on blur only. |
| errorMessage | string | Custom error message to show when input value is invalid | |
| errorMessageForce | boolean | false | Force error message to force. Useful in case you use custom validation and want to show/hide error message when you need it |
| info | string | Custom additional text with information about input | |
| name | string | Input name | |
| placeholder | string | Input placeholder | |
| id | string | Wrapping element ID attribute | |
| inputId | string | Input element ID attribute | |
| value | string number | Input value. If type=”datepicker” then value must be passed as what Calendar accepts - Array with dates, for example value={[new Date()}” If type=”colorpicker” then value must be passed as what Color Picker accepts - Object with colors, for example value={{hex: ‘#ff0000’}} |
|
| defaultValue | string number | Input value, in case of uncontrolled component | |
| size | string number | Value of input’s native “size” attribute | |
| pattern | string | Value of input’s native “pattern” attribute | |
| accept | string number | Value of input’s native “accept” attribute | |
| autocomplete | string | Value of input’s native “autocomplete” attribute | |
| autofocus | boolean | false | Value of input’s native “autofocus” attribute |
| autosave | string | Value of input’s native “autosave” attribute | |
| checked | boolean | false | Marks input as checked |
| disabled | boolean | false | Marks input as disabled |
| max | string number | Value of input’s native “max” attribute | |
| min | string number | Value of input’s native “min” attribute | |
| step | string number | Value of input’s native “step” attribute | |
| maxlength | string number | Value of input’s native “maxlength” attribute | |
| minlength | string number | Value of input’s native “minlength” attribute | |
| multiple | boolean | false | Value of input’s native “multiple” attribute |
| readonly | boolean | false | Marks input as readonly |
| required | boolean | false | Marks input as required |
| tabindex | string number | Value of input’s native “tabindex” attribute | |
| noStoreData | boolean | false | Allows to ignore input value to be stored when using with Form Storage |
| ignoreStoreData | boolean | false | Same as previous |
| wrap | boolean | true | When enabled it will be wrapped in <li> element |
| calendarParams | object | Object with Calendar Parameters which is used when type=”datepicker” |
|
| colorPickerParams | object | Object with Color Picker Parameters which is used when type=”colorpicker” |
|
| <Input> properties | |||
| outline | boolean | false | Makes input outline |
| wrap | boolean | true | Defines should the input be wraped with <div class=”input”> element or not. |
| type | string | Input type. All default HTML5 input type, and few special ones: - textarea - to render textarea element - select - to render select element - datepicker - to open Calendar on input focus - colorpicker - to open Color Picker on input focus | |
| resizable | boolean | false | Makes textarea resizable |
| inputStyle | object | Value of input’s “style” attribute, in case you need to pass extra styles | |
| clearButton | boolean | false | Adds input clear button that will clear input value on click |
| validate | boolean | false | When enabled then input value will be validated on change based on passed “pattern” or based on input type. If you use custom validation and need more control on where to show/hide error message, then it is better to disable validation and use error-message together with error-message-force props. |
| validateOnBlur | boolean | false | When enabled then input will be validated on blur only. |
| errorMessage | string | Custom error message to show when input value is invalid | |
| errorMessageForce | boolean | false | Force error message to force. Useful in case you use custom validation and want to show/hide error message when you need it |
| info | string | Custom additional text with information about input | |
| name | string | Input name | |
| placeholder | string | Input placeholder | |
| id | string | Wrapping element ID attribute | |
| inputId | string | Input element ID attribute | |
| value | string number | Input value. If type=”datepicker” then value must be passed as what Calendar accepts - Array with dates, for example value={[new Date()}” If type=”colorpicker” then value must be passed as what Color Picker accepts - Object with colors, for example value={{hex: ‘#ff0000’}} |
|
| defaultValue | string number | Input value, in case of uncontrolled component | |
| size | string number | Value of input’s native “size” attribute | |
| pattern | string | Value of input’s native “pattern” attribute | |
| accept | string number | Value of input’s native “accept” attribute | |
| autocomplete | string | Value of input’s native “autocomplete” attribute | |
| autofocus | boolean | false | Value of input’s native “autofocus” attribute |
| autosave | string | Value of input’s native “autosave” attribute | |
| checked | boolean | false | Marks input as checked |
| disabled | boolean | false | Marks input as disabled |
| max | string number | Value of input’s native “max” attribute | |
| min | string number | Value of input’s native “min” attribute | |
| step | string number | Value of input’s native “step” attribute | |
| maxlength | string number | Value of input’s native “maxlength” attribute | |
| minlength | string number | Value of input’s native “minlength” attribute | |
| multiple | boolean | false | Value of input’s native “multiple” attribute |
| readonly | boolean | false | Marks input as readonly |
| required | boolean | false | Marks input as required |
| tabindex | string number | Value of input’s native “tabindex” attribute | |
| noStoreData | boolean | false | Allows to ignore input value to be stored when using with Form Storage |
| ignoreStoreData | boolean | false | Same as previous |
| calendarParams | object | Object with Calendar Parameters which is used when type=”datepicker” |
|
| colorPickerParams | object | Object with Color Picker Parameters which is used when type=”colorpicker” |
Input Events
| Event | Arguments | Description |
|---|---|---|
| <ListInput>, <Input> events | ||
| --- | --- | --- |
| focus | (event) | Fired when user focused to input. |
| blur | (event) | Fired when user lost focus from input. |
| input | (event) | Fired immediately when input value changed. Note: Input event triggers after beforeinput, keypress, keyup, keydown events. |
| change | (event) | Fired on blur if value changed. |
| inputClear | (event) | Fired when input clear button clicked |
| textareaResize | (event) | Fired if resizable textarea resized. event.detail will contain object with the initialHeight, currentHeight and scrollHeight properties |
| inputEmpty | (event) | Fired when input value becomes empty |
| inputNotempty | (event) | Fired when input value becomes not empty |
| calendarChange | (value) | Fired when type=”datepicker” Calendar value changed. As an argument it receives array with selected dates. |
| colorPickerChange | (value) | Fired when type=”colorpicker” Color Picker value changed. As an argument it receives object with Color Picker value. |
Input Slots
<ListInput> has additional slots for custom elements:
**default**- in case oftype="select"ortype="textarea"- element will be placed inside ofselectortextareatags.**info**- element will be inserted into container with info message**error-message**- element will be inserted into container with error message**label**- element will be inserted into container with input’s label**input**- element will be inserted instead of input element (inputprop must be also set tofalse)**root-start**- element will be inserted in the beginning of<li>element**root**/**root-end**- element will be inserted in the end of<li>element**content-start**- element will be inserted in the beginning of<div class="item-content">element**content**/**content-end**- element will be inserted in the end of<div class="item-content">element**inner-start**- element will be inserted in the beginning of<div class="item-inner">element**inner**/**inner-end**- element will be inserted in the end of<div class="item-inner">element**media**- element will be inserted inside of<div class="item-media">element
Examples
Full Layout / Inline Labels
1. <List inlineLabels noHairlinesMd>
2. <ListInput
3. label="Name"
4. type="text"
5. placeholder="Your name"
6. clearButton
7. >
8. <Icon icon="demo-list-icon" slot="media"/>
9. </ListInput>
11. <ListInput
12. label="Password"
13. type="password"
14. placeholder="Your password"
15. clearButton
16. >
17. <Icon icon="demo-list-icon" slot="media"/>
18. </ListInput>
20. <ListInput
21. label="E-mail"
22. type="email"
23. placeholder="Your e-mail"
24. clearButton
25. >
26. <Icon icon="demo-list-icon" slot="media"/>
27. </ListInput>
29. <ListInput
30. label="URL"
31. type="url"
32. placeholder="URL"
33. clearButton
34. >
35. <Icon icon="demo-list-icon" slot="media"/>
36. </ListInput>
38. <ListInput
39. label="Phone"
40. type="tel"
41. placeholder="Your phone number"
42. clearButton
43. >
44. <Icon icon="demo-list-icon" slot="media"/>
45. </ListInput>
47. <ListInput
48. label="Gender"
49. type="select"
50. defaultValue="Male"
51. placeholder="Please choose..."
52. >
53. <Icon icon="demo-list-icon" slot="media"/>
54. <option value="Male">Male</option>
55. <option value="Female">Female</option>
56. </ListInput>
58. <ListInput
59. label="Birthday"
60. type="date"
61. defaultValue="2014-04-30"
62. placeholder="Please choose..."
63. >
64. <Icon icon="demo-list-icon" slot="media"/>
65. </ListInput>
67. <ListInput
68. label="Date time"
69. type="datetime-local"
70. placeholder="Please choose..."
71. >
72. <Icon icon="demo-list-icon" slot="media"/>
73. </ListInput>
75. <ListInput
76. label="Range"
77. input={false}
78. >
79. <Icon icon="demo-list-icon" slot="media"/>
80. <Range slot="input" value={50} min={0} max={100} step={1}/>
81. </ListInput>
83. <ListInput
84. label="Textarea"
85. type="textarea"
86. placeholder="Bio"
87. >
88. <Icon icon="demo-list-icon" slot="media"/>
89. </ListInput>
91. <ListInput
92. label="Resizable"
93. type="textarea"
94. resizable
95. placeholder="Bio"
96. >
97. <Icon icon="demo-list-icon" slot="media"/>
98. </ListInput>
99. </List>
Full Layout / Stacked Labels
1. <List noHairlinesMd>
2. <ListInput
3. label="Name"
4. type="text"
5. placeholder="Your name"
6. clearButton
7. >
8. <Icon icon="demo-list-icon" slot="media"/>
9. </ListInput>
11. <ListInput
12. label="Password"
13. type="password"
14. placeholder="Your password"
15. clearButton
16. >
17. <Icon icon="demo-list-icon" slot="media"/>
18. </ListInput>
20. <ListInput
21. label="E-mail"
22. type="email"
23. placeholder="Your e-mail"
24. clearButton
25. >
26. <Icon icon="demo-list-icon" slot="media"/>
27. </ListInput>
29. <ListInput
30. label="URL"
31. type="url"
32. placeholder="URL"
33. clearButton
34. >
35. <Icon icon="demo-list-icon" slot="media"/>
36. </ListInput>
38. <ListInput
39. label="Phone"
40. type="tel"
41. placeholder="Your phone number"
42. clearButton
43. >
44. <Icon icon="demo-list-icon" slot="media"/>
45. </ListInput>
47. <ListInput
48. label="Gender"
49. type="select"
50. defaultValue="Male"
51. placeholder="Please choose..."
52. >
53. <Icon icon="demo-list-icon" slot="media"/>
54. <option value="Male">Male</option>
55. <option value="Female">Female</option>
56. </ListInput>
58. <ListInput
59. label="Birthday"
60. type="date"
61. defaultValue="2014-04-30"
62. placeholder="Please choose..."
63. >
64. <Icon icon="demo-list-icon" slot="media"/>
65. </ListInput>
67. <ListInput
68. label="Date time"
69. type="datetime-local"
70. placeholder="Please choose..."
71. >
72. <Icon icon="demo-list-icon" slot="media"/>
73. </ListInput>
75. <ListInput
76. label="Range"
77. input={false}
78. >
79. <Icon icon="demo-list-icon" slot="media"/>
80. <Range slot="input" value={50} min={0} max={100} step={1}/>
81. </ListInput>
83. <ListInput
84. label="Textarea"
85. type="textarea"
86. placeholder="Bio"
87. >
88. <Icon icon="demo-list-icon" slot="media"/>
89. </ListInput>
91. <ListInput
92. label="Resizable"
93. type="textarea"
94. resizable
95. placeholder="Bio"
96. >
97. <Icon icon="demo-list-icon" slot="media"/>
98. </ListInput>
99. </List>
Date Pickers
1. <List noHairlinesMd>
2. <ListInput
3. label="Default setup"
4. type="datepicker"
5. placeholder="Your birth date"
6. readonly
7. />
8. <ListInput
9. label="Custom date format"
10. type="datepicker"
11. placeholder="Select date"
12. readonly
13. calendarParams={{dateFormat: 'DD, MM dd, yyyy'}}
14. />
15. <ListInput
16. label="Multiple Values"
17. type="datepicker"
18. placeholder="Select multiple dates"
19. readonly
20. calendarParams={{ dateFormat: 'M dd yyyy', multiple: true }}
21. />
22. <ListInput
23. label="Range Picker"
24. type="datepicker"
25. placeholder="Select date range"
26. readonly
27. calendarParams={{ dateFormat: 'M dd yyyy', rangePicker: true }}
28. />
29. <ListInput
30. label="Open in Modal"
31. type="datepicker"
32. placeholder="Select date"
33. readonly
34. calendarParams={{openIn: 'customModal', header: true, footer: true, dateFormat: 'MM dd yyyy'}}
35. />
36. </List>
Color Pickers
1. <List noHairlinesMd>
2. <ListInput
3. type="colorpicker"
4. label="Color Wheel"
5. placeholder="Color"
6. readonly
7. value={{ hex: '#00ff00' }}
8. />
9. <ListInput
10. type="colorpicker"
11. label="Saturation-Brightness Spectrum"
12. placeholder="Color"
13. readonly
14. value={{ hex: '#ff0000' }}
15. colorPickerParams={{
16. modules: ['sb-spectrum', 'hue-slider'],
17. }}
18. />
19. <ListInput
20. type="colorpicker"
21. label="RGB Sliders"
22. placeholder="Color"
23. readonly
24. value={{ hex: '#0000ff' }}
25. colorPickerParams={{
26. modules: ['rgb-sliders'],
27. sliderValue: true,
28. sliderLabel: true,
29. }}
30. />
31. <ListInput
32. type="colorpicker"
33. label="RGBA Sliders"
34. placeholder="Color"
35. readonly
36. value={{ hex: '#ff00ff' }}
37. colorPickerParams={{
38. modules: ['rgb-sliders', 'alpha-slider'],
39. sliderValue: true,
40. sliderLabel: true,
41. formatValue(value) {
42. return `rgba(${value.rgba.join(', ')})`;
43. },
44. }}
45. />
46. <ListInput
47. type="colorpicker"
48. label="HSB Sliders"
49. placeholder="Color"
50. readonly
51. value={{ hex: '#00ff00' }}
52. colorPickerParams={{
53. modules: ['hsb-sliders'],
54. sliderValue: true,
55. sliderLabel: true,
56. formatValue(value) {
57. return `hsb(${value.hsb[0]}, ${value.hsb[1] * 1000 / 10}%, ${value.hsb[2] * 1000 / 10}%)`
58. },
59. }}
60. />
61. <ListInput
62. type="colorpicker"
63. label="RGB Bars"
64. placeholder="Color"
65. readonly
66. value={{ hex: '#0000ff' }}
67. colorPickerParams={{
68. modules: ['rgb-bars'],
69. openIn: 'auto',
70. barValue: true,
71. barLabel: true,
72. formatValue(value) {
73. return `rgb(${value.rgb.join(', ')})`;
74. },
75. }}
76. />
77. <ListInput
78. type="colorpicker"
79. label="RGB Sliders + Colors"
80. placeholder="Color"
81. readonly
82. value={{ hex: '#ffff00' }}
83. colorPickerParams={{
84. modules: ['initial-current-colors', 'rgb-sliders'],
85. sliderValue: true,
86. sliderLabel: true,
87. formatValue(value) {
88. return `rgb(${value.rgb.join(', ')})`;
89. },
90. }}
91. />
92. <ListInput
93. type="colorpicker"
94. label="Palette"
95. placeholder="Color"
96. readonly
97. value={{ hex: '#FFEBEE' }}
98. colorPickerParams={{
99. modules: ['palette'],
100. openIn: 'auto',
101. openInPhone: 'sheet',
102. palette: [
103. ['#FFEBEE', '#FFCDD2', '#EF9A9A', '#E57373', '#EF5350', '#F44336', '#E53935', '#D32F2F', '#C62828', '#B71C1C'],
104. ['#F3E5F5', '#E1BEE7', '#CE93D8', '#BA68C8', '#AB47BC', '#9C27B0', '#8E24AA', '#7B1FA2', '#6A1B9A', '#4A148C'],
105. ['#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E'],
106. ['#E1F5FE', '#B3E5FC', '#81D4FA', '#4FC3F7', '#29B6F6', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B'],
107. ['#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40'],
108. ['#F1F8E9', '#DCEDC8', '#C5E1A5', '#AED581', '#9CCC65', '#8BC34A', '#7CB342', '#689F38', '#558B2F', '#33691E'],
109. ['#FFFDE7', '#FFF9C4', '#FFF59D', '#FFF176', '#FFEE58', '#FFEB3B', '#FDD835', '#FBC02D', '#F9A825', '#F57F17'],
110. ['#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100'],
111. ],
112. formatValue(value) {
113. return value.hex;
114. },
115. }}
116. />
117. <ListInput
118. type="colorpicker"
119. label="Pro Mode"
120. placeholder="Color"
121. readonly
122. value={{ hex: '#00ffff' }}
123. colorPickerParams={{
124. modules: ['initial-current-colors', 'sb-spectrum', 'hsb-sliders', 'rgb-sliders', 'alpha-slider', 'hex', 'palette'],
125. openIn: 'auto',
126. sliderValue: true,
127. sliderValueEditable: true,
128. sliderLabel: true,
129. hexLabel: true,
130. hexValueEditable: true,
131. groupedModules: true,
132. palette: [
133. ['#FFEBEE', '#FFCDD2', '#EF9A9A', '#E57373', '#EF5350', '#F44336', '#E53935', '#D32F2F', '#C62828', '#B71C1C'],
134. ['#F3E5F5', '#E1BEE7', '#CE93D8', '#BA68C8', '#AB47BC', '#9C27B0', '#8E24AA', '#7B1FA2', '#6A1B9A', '#4A148C'],
135. ['#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E'],
136. ['#E1F5FE', '#B3E5FC', '#81D4FA', '#4FC3F7', '#29B6F6', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B'],
137. ['#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40'],
138. ['#F1F8E9', '#DCEDC8', '#C5E1A5', '#AED581', '#9CCC65', '#8BC34A', '#7CB342', '#689F38', '#558B2F', '#33691E'],
139. ['#FFFDE7', '#FFF9C4', '#FFF59D', '#FFF176', '#FFEE58', '#FFEB3B', '#FDD835', '#FBC02D', '#F9A825', '#F57F17'],
140. ['#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100'],
141. ],
142. formatValue(value) {
143. return `rgba(${value.rgba.join(', ')})`;
144. },
145. }}
146. />
147. </List>
Floating Labels
1. <List noHairlinesMd>
2. <ListInput
3. label="Name"
4. floatingLabel
5. type="text"
6. placeholder="Your name"
7. clearButton
8. >
9. <Icon icon="demo-list-icon" slot="media"/>
10. </ListInput>
12. <ListInput
13. label="Password"
14. floatingLabel
15. type="password"
16. placeholder="Your password"
17. clearButton
18. >
19. <Icon icon="demo-list-icon" slot="media"/>
20. </ListInput>
22. <ListInput
23. label="E-mail"
24. floatingLabel
25. type="email"
26. placeholder="Your e-mail"
27. clearButton
28. >
29. <Icon icon="demo-list-icon" slot="media"/>
30. </ListInput>
32. <ListInput
33. label="URL"
34. floatingLabel
35. type="url"
36. placeholder="URL"
37. clearButton
38. >
39. <Icon icon="demo-list-icon" slot="media"/>
40. </ListInput>
42. <ListInput
43. label="Phone"
44. floatingLabel
45. type="tel"
46. placeholder="Your phone number"
47. clearButton
48. >
49. <Icon icon="demo-list-icon" slot="media"/>
50. </ListInput>
52. <ListInput
53. label="Resizable"
54. floatingLabel
55. type="textarea"
56. resizable
57. placeholder="Bio"
58. >
59. <Icon icon="demo-list-icon" slot="media"/>
60. </ListInput>
61. </List>
Floating Labels + Outline Inputs
1. <List noHairlinesMd>
2. <ListInput
3. outline
4. label="Name"
5. floatingLabel
6. type="text"
7. placeholder="Your name"
8. clearButton
9. >
10. <Icon icon="demo-list-icon" slot="media" />
11. </ListInput>
12. <ListInput
13. outline
14. label="Password"
15. floatingLabel
16. type="password"
17. placeholder="Your password"
18. clearButton
19. >
20. <Icon icon="demo-list-icon" slot="media" />
21. </ListInput>
22. <ListInput
23. outline
24. label="E-mail"
25. floatingLabel
26. type="email"
27. placeholder="Your e-mail"
28. clearButton
29. >
30. <Icon icon="demo-list-icon" slot="media" />
31. </ListInput>
32. <ListInput
33. outline
34. label="URL"
35. floatingLabel
36. type="url"
37. placeholder="URL"
38. clearButton
39. >
40. <Icon icon="demo-list-icon" slot="media" />
41. </ListInput>
42. <ListInput
43. outline
44. label="Phone"
45. floatingLabel
46. type="tel"
47. placeholder="Your phone number"
48. clearButton
49. >
50. <Icon icon="demo-list-icon" slot="media" />
51. </ListInput>
52. <ListInput
53. outline
54. label="Bio"
55. floatingLabel
56. type="textarea"
57. resizable
58. placeholder="Bio"
59. clearButton
60. >
61. <Icon icon="demo-list-icon" slot="media" />
62. </ListInput>
63. </List>
Validation + Additional Info
1. <List noHairlinesMd>
2. <ListInput
3. label="Name"
4. type="text"
5. placeholder="Your name"
6. info="Default validation"
7. required
8. validate
9. clearButton
10. >
11. <Icon icon="demo-list-icon" slot="media"/>
12. </ListInput>
14. <ListInput
15. label="Fruit"
16. type="text"
17. placeholder="Type 'apple' or 'banana'"
18. required
19. validate
20. pattern="apple|banana"
21. clearButton
22. >
23. <Icon icon="demo-list-icon" slot="media"/>
24. <span slot="info">Pattern validation (<b>apple|banana</b>)</span>
25. </ListInput>
27. <ListInput
28. label="E-mail"
29. type="email"
30. placeholder="Your e-mail"
31. info="Default e-mail validation"
32. required
33. validate
34. clearButton
35. >
36. <Icon icon="demo-list-icon" slot="media"/>
37. </ListInput>
39. <ListInput
40. label="URL"
41. type="url"
42. placeholder="Your URL"
43. info="Default URL validation"
44. required
45. validate
46. clearButton
47. >
48. <Icon icon="demo-list-icon" slot="media"/>
49. </ListInput>
51. <ListInput
52. label="Number"
53. type="text"
54. placeholder="Enter number"
55. info="With custom error message"
56. errorMessage="Only numbers please!"
57. required
58. validate
59. pattern="[0-9]*"
60. clearButton
61. >
62. <Icon icon="demo-list-icon" slot="media"/>
63. </ListInput>
65. </List>
Icon + Input
1. <List noHairlinesMd>
2. <ListInput
3. type="text"
4. placeholder="Your name"
5. clearButton
6. >
7. <Icon icon="demo-list-icon" slot="media"/>
8. </ListInput>
10. <ListInput
11. type="password"
12. placeholder="Your password"
13. clearButton
14. >
15. <Icon icon="demo-list-icon" slot="media"/>
16. </ListInput>
18. <ListInput
19. type="email"
20. placeholder="Your e-mail"
21. clearButton
22. >
23. <Icon icon="demo-list-icon" slot="media"/>
24. </ListInput>
26. <ListInput
27. type="url"
28. placeholder="URL"
29. clearButton
30. >
31. <Icon icon="demo-list-icon" slot="media"/>
32. </ListInput>
34. </List>
Label + Input
1. <List noHairlinesMd>
2. <ListInput
3. label="Name"
4. type="text"
5. placeholder="Your name"
6. clearButton
7. />
9. <ListInput
10. label="Password"
11. type="password"
12. placeholder="Your password"
13. clearButton
14. />
16. <ListInput
17. label="E-mail"
18. type="email"
19. placeholder="Your e-mail"
20. clearButton
21. />
23. <ListInput
24. label="URL"
25. type="url"
26. placeholder="URL"
27. clearButton
28. />
29. </List>
Only Inputs
1. <List noHairlinesMd>
2. <ListInput
3. type="text"
4. placeholder="Your name"
5. clearButton
6. />
8. <ListInput
9. type="password"
10. placeholder="Your password"
11. clearButton
12. />
14. <ListInput
15. type="email"
16. placeholder="Your e-mail"
17. clearButton
18. />
20. <ListInput
21. type="url"
22. placeholder="URL"
23. clearButton
24. />
25. </List>
Inputs + Additional Info
1. <List noHairlinesMd>
2. <ListInput
3. type="text"
4. placeholder="Your name"
5. info="Full name please"
6. clearButton
7. />
9. <ListInput
10. type="password"
11. placeholder="Your password"
12. info="8 characters minimum"
13. clearButton
14. />
16. <ListInput
17. type="email"
18. placeholder="Your e-mail"
19. info="Your work e-mail address"
20. clearButton
21. />
23. <ListInput
24. type="url"
25. placeholder="URL"
26. info="Your website URL"
27. clearButton
28. />
29. </List>
Only Inputs Inset
1. <List inset>
2. <ListInput
3. type="text"
4. placeholder="Your name"
5. clearButton
6. />
8. <ListInput
9. type="password"
10. placeholder="Your password"
11. clearButton
12. />
14. <ListInput
15. type="email"
16. placeholder="Your e-mail"
17. clearButton
18. />
20. <ListInput
21. type="url"
22. placeholder="URL"
23. clearButton
24. />
25. </List>
