Radio# 

Ripple UI comes with Radio component.

Default# 

Simple example of Radio.

HTML
JSX
<label class="flex cursor-pointer gap-2">
<input type="radio" class="radio" />
<span>Remember me?</span>
</label>

Colors# 

Radio colors.

HTML
JSX
<input type="radio" class="radio-primary radio" checked />
<input type="radio" class="radio-secondary radio" checked />
<input type="radio" class="radio-success radio" checked />
<input type="radio" class="radio-warning radio" checked />
<input type="radio" class="radio-error radio" checked />

Bordered# 

Radio bordered.

HTML
JSX
<input type="radio" class="radio radio-bordered-primary" />
<input type="radio" class="radio radio-bordered-secondary" />
<input type="radio" class="radio radio-bordered-success" />
<input type="radio" class="radio radio-bordered-warning" />
<input type="radio" class="radio radio-bordered-error" />

Sizes# 

Radio in different sizes.

HTML
JSX
<input type="radio" class="radio radio-xs" checked />
<input type="radio" class="radio radio-sm" checked />
<input type="radio" class="radio radio-md" checked />
<input type="radio" class="radio radio-lg" checked />
<input type="radio" class="radio radio-xl" checked />

Radio Group# 

Radio Group.

HTML
JSX
<div id="group1" class="flex flex-row gap-3">
<input type="radio" class="radio" name="group1" />
<input type="radio" class="radio" name="group1" />
<input type="radio" class="radio" name="group1" />
</div>

Disabled# 

Radio disabled.

HTML
JSX
<input type="radio" class="radio" disabled />
<input type="radio" class="radio" disabled checked />

API# 

classDescription
radioRadio base class
radio-primarySet primary color
radio-secondarySet secondary color
radio-successSet success color
radio-errorSet error color
radio-warningSet warning color
radio-bordered-primaryWith primary border by default
radio-bordered-secondaryWith secondary border by default
radio-bordered-successWith success border by default
radio-bordered-errorWith error border by default
radio-bordered-warningWith warning border by default
radio-xsSet extra small size
radio-smSet small size
radio-mdSet medium size
radio-lgSet large size
radio-xlSet extra large size
Edit this page on GitHub