输入/表单输入
表单输入允许您创建灵活而漂亮的表单布局。
输入布局
建议将输入组件与列表视图一同使用
<div class="list">
<ul>
...
<li class="item-content item-input">
<div class="item-media">... icon/image here ...</div>
<div class="item-inner">
<div class="item-input-wrap">
<input type="text" name="name" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
...
</ul>
</div>
其中
item-input
- 必需在item-content
上添加附加的类。这是正确的输入项目布局所必需的item-label
- 必需在item-title
上添加附加的类,以便正确显示标签item-input-wrap
- 必需添加额外的输入包装。这必须是item-inner
的直接子元素<span class="input-clear-button">
- 在单击时清除输入值的按钮。可选
堆叠标签
默认情况下,输入列表的显示采用堆叠标签。堆叠标签始终显示在输入之上
<div class="list">
<ul>
...
<li class="item-content item-input">
<div class="item-media">... icon/image here ...</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" name="name" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
...
</ul>
</div>
其中
item-title item-label
- 输入标签
浮动标签
要添加浮动标签,我们需要使用 item-floating-label
类,而不是 item-label
。
<div class="list">
<ul>
...
<li class="item-content item-input">
<div class="item-media">... icon/image here ...</div>
<div class="item-inner">
<!-- "item-floating-label" class on item title -->
<div class="item-title item-floating-label">Name</div>
<div class="item-input-wrap">
<input type="text" name="name" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
...
</ul>
</div>
轮廓输入
要制作“轮廓”输入(即围绕输入添加边框),我们需要向主列表输入元素添加 item-input-outline
类
<div class="list">
<ul>
...
<!-- additional "item-input-outline" class -->
<li class="item-content item-input item-input-outline">
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" name="name" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
...
</ul>
</div>
项目信息
还可以对表单输入添加附加的信息
<div class="list">
<ul>
...
<!-- additional "item-input-with-info" class on item -->
<li class="item-content item-input item-input-with-info">
<div class="item-media">... icon/image here ...</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" name="name" />
<span class="input-clear-button"></span>
<!-- element with additional information -->
<div class="item-input-info">Some information about input field</div>
</div>
</div>
</li>
...
</ul>
</div>
其中
item-input-with-info
- 必需在输入项目上添加额外的类<div class="item-input-info">...</div>
- 包含附加信息的元素
输入下拉菜单
还可以使用附加的 input-dropdown-wrap
类指示下拉输入(例如选择)。这将在右侧添加一个小的下拉图标(▼)
<div class="list">
<ul>
...
<li class="item-content item-input">
<div class="item-media">... icon/image here ...</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<!-- additional "input-dropdown-wrap" class -->
<div class="item-input-wrap input-dropdown-wrap">
<select>
...
</select>
</div>
</div>
</li>
...
</ul>
</div>
支持的输入
这里列出了你可以放入 item-input-wrap
内的输入元素
所有文本输入 | 支持的类型:text 、password 、email 、tel 、url 、date 、number 、datetime-local
|
选择 |
|
文本框 |
|
范围选择器 |
|
可调整文本框大小
要让文本框根据其内容自动改变大小,我们可以只添加 resizable
类
<textarea class="resizable"></textarea>
验证
Framework7 支持基于 validity
输入属性的 HTML5 验证。启用验证之后,当输入的值无效时会显示验证错误消息。
为了启用验证,我们必须向输入元素添加 required
和 validate
特性。
如果我们仅需要对 blur
事件进行输入验证,那么我们需要添加 data-validate-on-blur="true"
特性。
值验证取决于输入的 type
。举例来说,input type="email"
会被验证是否匹配电子邮件模式,等等。这是默认的浏览器行为。如果你想要添加自定义规则来验证输入值,那么你必须使用 pattern
输入属性。
<!-- default validation, check for value is not empty -->
<input type="text" placeholder="Your name" required validate />
<!-- default email validation, value must be email -->
<input type="email" placeholder="Your e-mail" required validate />
<!-- default url validation -->
<input type="url" placeholder="Your URL" required validate />
<!-- pattern validation, value must be "apple" or "banana" -->
<input type="text" required validate pattern="apple|banana" placeholder="Type 'apple' or 'banana'" />
<!-- pattern validation with custom error message, value must be numbers only -->
<input type="text" placeholder="Enter number" required validate pattern="[0-9]*" data-error-message="Only numbers please!" />
<!-- this input will be validated only on blur -->
<input type="text" placeholder="Your name" required validate data-validate-on-blur="true" />
输入状态类
可以向输入元素添加多个类,这些类取决于其状态和内容
input-with-value
- 当输入有值时会添加到输入input-focused
- 当输入获得焦点时会添加到输入input-invalid
- 当输入的值无效时添加到输入
相同状态将被添加到输入项的父 item-input
元素
item-input-with-value
- 当输入项输入内容后,将其添加到输入项item-input-focused
- 当输入项获得焦点时将其添加到输入项item-input-invalid
- 当输入项的值无效时将其添加到输入项
输入应用程序参数
可以在传递 input
属性中与输入相关的参数的全局应用程序参数中控制某些默认输入行为
参数 | 类型 | 默认值 | 描述 |
---|---|---|---|
scrollIntoViewOnFocus | 布尔值 | 启用时,输入项获得焦点时会滚动到视图中。默认仅对 Android 设备启用,因为它有助于解决屏幕键盘可能与输入项重叠的问题 | |
scrollIntoViewCentered | 布尔值 | 假 | 微调前一个参数,以便在输入项获得焦点时将输入项滚动到 视图中心 |
scrollIntoViewDuration | 数字 | 0 | 滚动输入到视图中的默认持续时间 |
scrollIntoViewAlways | 布尔值 | 假 | 启用后,无论输入项是否在视图外,都将滚动输入项到视图中 |
例如
var app = new Framework7({
input: {
scrollIntoViewOnFocus: true,
scrollIntoViewCentered: true,
}
});
输入应用程序方法
我们可以使用以下应用程序方法来控制输入项
app.input.scrollIntoView(inputEl, duration, centered, force) | 将输入项滚动到视图中
|
app.input.focus(inputEl) | 将添加与输入项获得焦点时一样的其他必需样式和类
|
app.input.blur(inputEl) | 将移除输入项失去焦点时的其他必需样式和类
|
app.input.resizeTextarea(textareaEl) | 强制可调整大小的文本区域根据其内容调整大小
|
app.input.checkEmptyState(inputEl) | 根据输入元素是否有值重新计算所需的其他样式和类
|
app.input.validate(inputEl) | 验证输入项
|
app.input.validateInputs(containerEl) | 验证传递容器中的所有输入
|
输入事件
输入将触发以下 DOM 事件输入元素
事件 | 目标 | 描述 |
---|---|---|
textarea:resize | 文本区域元素<textarea class="resizable"> | 可调整大小的文本区域调整大小后将触发事件。event.detail 将包含具有 initialHeight 、currentHeight 和 scrollHeight 属性的对象 |
input:notempty | 输入元素<input/textarea> | 当输入值变为非空时将触发事件 |
input:empty | 输入元素<input/textarea> | 当输入值变为空时将触发事件 |
input:clear | 输入元素<input/textarea> | 单击输入清除按钮后,将触发事件来清除输入值 |
CSS 变量
下面列出了相关的 CSS 变量(CSS 自定义属性)。
请注意,注释的变量未默认指定,其值为在这种情况下回退到的值。
:root {
--f7-input-bg-color: transparent;
--f7-label-font-weight: 400;
--f7-label-height: 16px;
--f7-label-font-size: 12px;
--f7-floating-label-scale: calc(16 / 12);
--f7-input-padding-left: 0px;
--f7-input-padding-right: 0px;
--f7-input-error-text-color: #ff3b30;
--f7-input-error-font-size: 12px;
--f7-input-error-line-height: 1.4;
--f7-input-error-font-weight: 400;
--f7-input-info-font-size: 12px;
--f7-input-info-line-height: 1.4;
--f7-textarea-height: 100px;
/*
--f7-input-outline-focused-border-color: var(--f7-theme-color);
--f7-input-outline-invalid-border-color: var(--f7-input-error-text-color);
*/
}
.ios {
--f7-input-item-bg-color: transparent;
--f7-input-item-border-radius: 0px;
--f7-input-height: 40px;
--f7-input-font-size: 16px;
--f7-input-placeholder-color: #a9a9a9;
--f7-textarea-padding-vertical: 8px;
/*
--f7-input-focused-border-color: var(--f7-list-item-border-color);
--f7-input-invalid-border-color: var(--f7-list-item-border-color);
--f7-input-invalid-text-color: var(--f7-input-error-text-color);
*/
--f7-label-text-color: inherit;
/*
--f7-label-focused-text-color: var(--f7-label-text-color);
--f7-label-invalid-text-color: var(--f7-label-text-color);
*/
--f7-input-clear-button-size: 14px;
--f7-input-outline-border-radius: 8px;
--f7-input-text-color: #000000;
--f7-input-info-text-color: rgba(0, 0, 0, 0.45);
--f7-input-clear-button-color: rgba(0, 0, 0, 0.45);
--f7-input-outline-border-color: #bbb;
}
.ios .dark,
.ios.dark {
--f7-input-text-color: #fff;
--f7-input-info-text-color: rgba(255, 255, 255, 0.55);
--f7-input-clear-button-color: rgba(255, 255, 255, 0.5);
--f7-input-outline-border-color: #444;
}
.md {
--f7-input-item-border-radius: 4px 4px 0 0;
--f7-input-height: 24px;
--f7-input-font-size: 16px;
--f7-textarea-padding-vertical: 0px;
--f7-input-outline-border-radius: 4px;
/*
--f7-input-focused-border-color: var(--f7-theme-color);
--f7-input-invalid-border-color: var(--f7-input-error-text-color);
--f7-input-invalid-text-color: var(--f7-input-text-color);
*/
/*
--f7-label-focused-text-color: var(--f7-theme-color);
--f7-label-invalid-text-color: var(--f7-input-error-text-color );
*/
--f7-floating-label-scale: calc(16 / 12);
--f7-input-clear-button-size: 24px;
--f7-input-info-text-color: rgba(0, 0, 0, 0.45);
}
.md .dark,
.md.dark {
--f7-input-info-text-color: rgba(255, 255, 255, 0.45);
}
.md,
.md .dark,
.md [class*='color-'] {
--f7-input-placeholder-color: var(--f7-md-on-surface-variant);
--f7-input-item-bg-color: var(--f7-md-surface-variant);
--f7-input-border-color: var(--f7-md-outline);
--f7-input-clear-button-color: var(--f7-md-on-surface-variant);
--f7-input-outline-border-color: var(--f7-md-outline);
--f7-input-text-color: var(--f7-md-on-surface);
--f7-label-text-color: var(--f7-md-on-surface-variant);
}
示例
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner sliding">
<div class="title">Form Inputs</div>
</div>
</div>
<div class="page-content">
<div class="block-title">Full Layout / Stacked Labels</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Password</div>
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Phone</div>
<div class="item-input-wrap">
<input type="tel" placeholder="Your phone number">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Gender</div>
<div class="item-input-wrap input-dropdown-wrap">
<select placeholder="Please choose...">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Birthday</div>
<div class="item-input-wrap">
<input type="date" value="2014-04-30" placeholder="Please choose...">
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Date time</div>
<div class="item-input-wrap">
<input type="datetime-local" placeholder="Please choose...">
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Range</div>
<div class="item-input-wrap">
<div class="range-slider range-slider-init" data-label="true">
<input type="range" value="50" min="0" max="100" step="1">
</div>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Textarea</div>
<div class="item-input-wrap">
<textarea placeholder="Bio"></textarea>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Resizable</div>
<div class="item-input-wrap">
<textarea class="resizable" placeholder="Bio"></textarea>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Floating Labels</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Password</div>
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Phone</div>
<div class="item-input-wrap">
<input type="tel" placeholder="Your phone number">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Bio</div>
<div class="item-input-wrap">
<textarea class="resizable" placeholder="Bio"></textarea>
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Outline Inputs</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Password</div>
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Phone</div>
<div class="item-input-wrap">
<input type="tel" placeholder="Your phone number">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Bio</div>
<div class="item-input-wrap">
<textarea class="resizable" placeholder="Bio"></textarea>
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Floating Labels + Outline Inputs</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Password</div>
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Phone</div>
<div class="item-input-wrap">
<input type="tel" placeholder="Your phone number">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input item-input-outline">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-floating-label">Bio</div>
<div class="item-input-wrap">
<textarea class="resizable" placeholder="Bio"></textarea>
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Validation + Additional Info</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input item-input-with-info">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name" required validate>
<span class="input-clear-button"></span>
<div class="item-input-info">Default "required" validation</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Fruit</div>
<div class="item-input-wrap">
<input type="text" placeholder="Type 'apple' or 'banana'" required validate pattern="apple|banana">
<span class="input-clear-button"></span>
<div class="item-input-info">Pattern validation (<b>apple|banana</b>)</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail" required validate>
<span class="input-clear-button"></span>
<div class="item-input-info">Default e-mail validation</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="Your URL" required validate>
<span class="input-clear-button"></span>
<div class="item-input-info">Default URL validation</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-title item-label">Number</div>
<div class="item-input-wrap">
<input type="text" placeholder="Enter number" required validate pattern="[0-9]*"
data-error-message="Only numbers please!">
<span class="input-clear-button"></span>
<div class="item-input-info">With custom error message</div>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Icon + Input</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-media">
<i class="icon demo-list-icon"></i>
</div>
<div class="item-inner">
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Label + Input</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-label">Name</div>
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-label">Password</div>
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-label">E-mail</div>
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-label">URL</div>
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Only Inputs</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
</div>
</div>
</li>
</ul>
</div>
<div class="block-title">Inputs + Additional Info</div>
<div class="list list-strong-ios list-dividers-ios inset-ios">
<ul>
<li class="item-content item-input item-input-with-info">
<div class="item-inner">
<div class="item-input-wrap">
<input type="text" placeholder="Your name">
<span class="input-clear-button"></span>
<div class="item-input-info">Full name please</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-inner">
<div class="item-input-wrap">
<input type="password" placeholder="Your password">
<span class="input-clear-button"></span>
<div class="item-input-info">8 characters minimum</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-inner">
<div class="item-input-wrap">
<input type="email" placeholder="Your e-mail">
<span class="input-clear-button"></span>
<div class="item-input-info">Your work e-mail address</div>
</div>
</div>
</li>
<li class="item-content item-input item-input-with-info">
<div class="item-inner">
<div class="item-input-wrap">
<input type="url" placeholder="URL">
<span class="input-clear-button"></span>
<div class="item-input-info">Your website URL</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>