快速开始 主题配置
容器
布局 Layout 容器 Docker 定位 Position 外边距 Margin 内边距 Padding 溢出 Overflow
元素
颜色 Color 文字 Font 图标 Icon 图片 Image 按钮 Button 提示 Tip 标签 Tag 徽标 Badge 表格 Table 菜单 Menu 面包屑 Breadcrumb 选项卡 Tab 分页 Pagination 阴影 Shadow
组件
表单 Form 输入框 Input 文本域 Textarea 单选框 Radio 多选框 Checkbox 选择器 Select 计数器 Counter 折叠面板 Collapse 模态框 Modal 动画 Animation
作者
问题反馈

单选框 Radio

概述

基础组件,触发业务逻辑时使用。

单选框 Radio

用法:设置类j-radio,为每一个选项label进行标记。如:

<div class="j-radio-group">
    <label for="" class="j-radio j-is-checked" tabindex="">
        <span class="j-radio-input j-is-checked">
            <span class="j-radio-inner"><span>
            <input type="radio" tabindex="" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项1</span>
    </label>
    <label for="" class="j-radio" tabindex="">
        <span class="j-radio-input">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="" class="j-radio-radio" value="2">
        </span>
        <span class="j-radio-label">选项2</span>
    </label>
</div>
禁用 Radio 单选框

用法:设置类j-is-disabled,为每一个选项label进行标记。如:

<div class="j-radio-group">
    <label for="" class="j-radio j-is-checked j-is-disabled" tabindex="">
        <span class="j-radio-input j-is-checked j-is-disabled">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项1</span>
    </label>
    <label for="" class="j-radio j-is-disabled" tabindex="">
        <span class="j-radio-input j-is-disabled">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项2</span>
    </label>
</div>
带边框的 Radio 幽灵单选框

用法:设置类j-is-ghost,为每一个选项label进行标记。如:

<div class="j-radio-group">
    <label for="" class="j-radio j-is-ghost j-is-checked" tabindex="0">
        <span class="j-radio-input j-is-checked">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        <span>
        <span class="j-radio-label">选项1</span>
    </label>
    <label for="" class="j-radio j-is-ghost" tabindex="0">
        <span class="j-radio-input">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项2</span>
    </label>
</div>
禁用 带边框的 Radio 幽灵单选框

用法:设置类j-is-ghost j-is-disabled,为每一个选项label进行标记。如:

<div class="j-radio-group">
    <label for="" class="j-radio j-is-ghost j-is-checked j-is-disabled" tabindex="0">
        <span class="j-radio-input j-is-checked j-is-disabled">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项1</span>
    </label>
    <label for="" class="j-radio j-is-ghostj-is-disabled" tabindex="0">
        <span class="j-radio-input j-is-disabled">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">选项2</span>
    </label>
</div>
多规格 Radio 幽灵单选框

用法:设置类j-is-**为尺寸值。如:

5种尺寸:默认尺寸和j-is-largej-is-mediumj-is-smallj-is-mini

<div class="j-radio-group">
    <label for="" class="j-radio j-is-ghost j-is-large" tabindex="0">
        <span class="j-radio-input">
            <span class="j-radio-inner"></span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">大<span>
    </label>
    <label for="" class="j-radio j-is-ghost" tabindex="0">
        <span class="j-radio-input">
            <span class="j-radio-inner"><span>
            <input type="radio" tabindex="-1" class="j-radio-radio" value="1">
        </span>
        <span class="j-radio-label">默认<span>
    </label>
</div>
组合 Radio 幽灵单选框

用法:设置类j-radio-ghost-group

<div class="j-radio-ghost-group">
    <label for="" class="j-radio j-is-ghost j-is-checked" tabindex="0">
        <input type="radio" tabindex="-1" class="j-radio-ghost" value="1">
        <span class="j-radio-label">北京</span>
    </label>
    <label for="" class="j-radio j-is-ghost" tabindex="0">
        <input type="radio" tabindex="-1" class="j-radio-ghost" value="1">
        <span class="j-radio-label">上海</span>
    </label>
    <label for="" class="j-radio j-is-ghost" tabindex="0">
        <input type="radio" tabindex="-1" class="j-radio-ghost" value="1">
        <span class="j-radio-label">深圳</span>
    <label>
    <label for="" class="j-radio j-is-ghost" tabindex="0">
        <input type="radio" tabindex="-1" class="j-radio-ghost" value="1">
        <span class="j-radio-label">成都<span>
    </label>
</div>
上一章:文本域 Textarea
下一章:多选框 Checkbox