Radio

Select an option from a set

Selection: Jack

<template>
    <section>
        <div class="block">
            <b-radio v-model="radio"
                name="name"
                native-value="Flint">
                Flint
            </b-radio>
            <b-radio v-model="radio"
                name="name"
                native-value="Silver">
                Silver
            </b-radio>
            <b-radio v-model="radio"
                name="name"
                native-value="Jack">
                Jack
            </b-radio>
            <b-radio v-model="radio"
                name="name"
                native-value="Vane"
                disabled>
                Vane
            </b-radio>
        </div>
        <p class="content">
            <b>Selection:</b>
            {{ radio }}
        </p>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                radio: 'Jack'
            }
        }
    }
</script>

# Sizes

<template>
    <section>
        <b-field>
            <b-radio v-model="radio"
                size="is-small"
                native-value="small">
                Small
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                native-value="default">
                Default
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                size="is-medium"
                native-value="medium">
                Medium
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                size="is-large"
                native-value="large">
                Large
            </b-radio>
        </b-field>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                radio: 'default'
            }
        }
    }
</script>

# Types

<template>
    <section>
        <b-field>
            <b-radio v-model="radio"
                native-value="default">
                Default
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                native-value="info"
                type="is-info">
                Info
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                native-value="success"
                type="is-success">
                Success
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                native-value="danger"
                type="is-danger">
                Danger
            </b-radio>
        </b-field>
        <b-field>
            <b-radio v-model="radio"
                native-value="warning"
                type="is-warning">
                Warning
            </b-radio>
        </b-field>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                radio: 'default'
            }
        }
    }
</script>

# Radio Button

You have to wrap them on a Field.

Selection:

<template>
    <section>
        <b-field>
            <b-radio-button v-model="radioButton"
                native-value="Nope"
                type="is-danger is-light is-outlined">
                <b-icon icon="close"></b-icon>
                <span>Nope</span>
            </b-radio-button>

            <b-radio-button v-model="radioButton"
                native-value="Yep"
                type="is-success is-light is-outlined">
                <b-icon icon="check"></b-icon>
                <span>Yep</span>
            </b-radio-button>

            <b-radio-button v-model="radioButton"
                native-value="Default"
                type="is-primary is-light is-outlined">
                Default
            </b-radio-button>

            <b-radio-button v-model="radioButton"
                native-value="Disabled"
                disabled>
                Disabled
            </b-radio-button>
        </b-field>
        <p class="content">
            <b>Selection:</b>
            {{ radioButton }}
        </p>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                radioButton: ''
            }
        }
    }
</script>

# API

Radio

Name
Description
Type
Values
Default
v-modelBinding valueAny
native-valueSame as native valueAny
disabledSame as native disabledBooleanfalse
requiredSame as native requiredBooleanfalse
nameSame as native nameString
sizeSize of the control, optionalStringis-small, is-medium, is-large
typeType (color) of the control, optionalStringis-white, is-black, is-light, is-dark, is-primary, is-info, is-success, is-warning, is-danger, and any other colors you've set in the $colors list on Sass

Button

Name
Description
Type
Values
Default
v-modelBinding valueAny
native-valueSame as native valueAny
typeType (color) of the button when checkedStringis-white, is-black, is-light, is-dark, is-primary, is-info, is-success, is-warning, is-danger, and any other colors you've set in the $colors list on Sassis-primary
disabledSame as native disabledBooleanfalse
nameSame as native nameString
sizeSize of the button, optionalStringis-small, is-medium, is-large
expandedRadio button will be expanded (full-width)Booleanfalse

# Variables

You can use these variables to customize this component.

Name
Default
$radio-active-background-color$primary
$radio-size1.25em
$radio-colors$form-colors

This page is open source. Noticed a typo or something's unclear?

Improve this page on GitHub