Skip to content
MENU

Soracom

Design System

Radio

Options 

Basic usage 

The example below uses 2 radio components
<label class="ds-radio">
  <input type="radio" name="radio-basic">
  <div>Radio label 1</div>
</label>
<label class="ds-radio">
  <input type="radio" name="radio-basic">
  <div>Radio label 2</div>
</label>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<label class="ds-radio">
  <input type="radio" name="radio-basic">
  <div>Radio label 1</div>
</label>
<label class="ds-radio">
  <input type="radio" name="radio-basic">
  <div>Radio label 2</div>
</label>

Using <div> elements 

As an alternative to using a <label> html element as the container - you may also use a <div>, with the <label> element inside it. The previous examples are the preferred structure for semantic reasons, but they will work with the syntax shown below.

The example below uses 2 radio components
<div class="ds-radio">
  <input type="radio" name="radio-div" id="radio-div-1">
  <label for="radio-div-1">Radio label 1</label>
</div>
<div class="ds-radio">
  <input type="radio" name="radio-div" id="radio-div-2">
  <label for="radio-div-2">Radio label 2</label>
</div>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<div class="ds-radio">
  <input type="radio" name="radio-div" id="radio-div-1">
  <label for="radio-div-1">Radio label 1</label>
</div>
<div class="ds-radio">
  <input type="radio" name="radio-div" id="radio-div-2">
  <label for="radio-div-2">Radio label 2</label>
</div>

Styles 

Custom styles exist for specific use cases.

Dots 

The example below uses 2 radio components
<label class="ds-radio--dots">
  <input type="radio" name="radio-dots">
  <div>A</div>
</label>
<label class="ds-radio--dots">
  <input type="radio" name="radio-dots">
  <div>B</div>
</label>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<label class="ds-radio--dots">
  <input type="radio" name="radio-dots">
  <div>A</div>
</label>
<label class="ds-radio--dots">
  <input type="radio" name="radio-dots">
  <div>B</div>
</label>

Panels 

By default, multiple .ds-radio--panel components adjacent to each other will display stacked as the shown below.

The example below uses 2 radio components
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>

To have a horizontal set of panels, place them inside a .ds-cols container.

Example inside ds-cols. The example below uses 2 radio components
<div class="ds-cols">
<label class="ds-span--6 ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
<label class="ds-span--6 ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
</div>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<div class="ds-cols">
<label class="ds-span--6 ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
<label class="ds-span--6 ds-radio--panel">
  <input type="radio" name="radio-panel">
  <div>Global multicarrier cellular connectivity built for IoT & M2M. Pay as you go with no commitments and all the tools you need to manage and secure your IoT network and devices.</div>
</label>
</div>
Longer mixed content example. The example below uses 2 radio components
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel-2">
  <div>
    <h4>Aenean lacinia bibendum</h4>
    <p>Morbi leo risus, porta ac consectetur ac, <em>vestibulum at eros</em>. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Nullam quis risus eget urna mollis ornare vel eu leo. <strong>Aenean lacinia bibendum nulla</strong> sed consectetur.</p>
    <p>Nulla vitae elit libero, a pharetra augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </div>
</label>
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel-2">
  <div>
    <h4>Aenean lacinia bibendum</h4>
    <p>Morbi leo risus, porta ac consectetur ac, <em>vestibulum at eros</em>. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Nullam quis risus eget urna mollis ornare vel eu leo. <strong>Aenean lacinia bibendum nulla</strong> sed consectetur.</p>
    <p>Nulla vitae elit libero, a pharetra augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </div>
</label>
XS Mobile 320px Mobile 420px Tablet 680px Desktop 960px
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel-2">
  <div>
    <h4>Aenean lacinia bibendum</h4>
    <p>Morbi leo risus, porta ac consectetur ac, <em>vestibulum at eros</em>. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Nullam quis risus eget urna mollis ornare vel eu leo. <strong>Aenean lacinia bibendum nulla</strong> sed consectetur.</p>
    <p>Nulla vitae elit libero, a pharetra augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </div>
</label>
<label class="ds-radio--panel">
  <input type="radio" name="radio-panel-2">
  <div>
    <h4>Aenean lacinia bibendum</h4>
    <p>Morbi leo risus, porta ac consectetur ac, <em>vestibulum at eros</em>. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Nullam quis risus eget urna mollis ornare vel eu leo. <strong>Aenean lacinia bibendum nulla</strong> sed consectetur.</p>
    <p>Nulla vitae elit libero, a pharetra augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </div>
</label>

Tags 

This option is available using ds-tags which has additional features.