Elements
Radios
Form controls for selecting one option from a group.
Setup
Radio styles are included in Manifest CSS or a standalone stylesheet, both referencing theme variables.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mnfst@latest/lib/manifest.min.css" />
Default
<input type="radio" name="default" checked />
<input type="radio" name="default" />
Utilities
Radios accept Manifest utility classes, which can be stacked in any combination.
Colors
<!-- Brand variant -->
<input type="radio" class="brand" name="colors" checked />
<!-- Accent variant -->
<input type="radio" class="accent" name="colors" />
<!-- Positive variant -->
<input type="radio" class="positive" name="colors" />
<!-- Negative variant -->
<input type="radio" class="negative" name="colors" />
Size
<!-- Small variant -->
<input type="radio" class="sm" name="sizes" checked />
<!-- Large variant -->
<input type="radio" class="lg" name="sizes" />
Outlined
<!-- Border variant -->
<input type="radio" class="outlined" name="outlines" checked />
<!-- Combined with colors -->
<input type="radio" class="outlined brand" name="outlines" />
<input type="radio" class="outlined accent" name="outlines" />
<input type="radio" class="outlined positive" name="outlines" />
<input type="radio" class="outlined negative" name="outlines" />
Form Layouts
Labels
Placing the radio and text inside a <label> automatically arranges them in a row.
<label>
<input type="radio" name="labelled" checked />
Option A
</label>
<label>
<input type="radio" name="labelled" />
Option B
</label>
Groups
Placing labelled radios inside a <fieldset> automatically arranges them in a column with a gap.
<fieldset>
<label>
<input type="radio" name="group" checked />
Option A
</label>
<label>
<input type="radio" name="group" />
Option B
</label>
<label>
<input type="radio" name="group" />
Option C
</label>
</fieldset>
Styles
Theme
Default radios use the following theme variables:
| Variable | Purpose |
|---|---|
--color-field-surface |
Radio background |
--color-field-surface-hover |
Radio background on hover |
--color-field-inverse |
Radio icon color |
--spacing-field-height |
Radio size |
--transition |
Transition for interactive states |
Customization
Modify base radio styles with custom CSS for the input[type=radio] selector. Overriding the field theme variables keeps both color modes working.
input[type=radio] {
--color-field-surface: color-mix(in oklch, var(--color-brand-surface) 20%, transparent);
--color-field-inverse: var(--color-brand-content);
border: 2px solid var(--color-brand-surface);
}
Article does not exist
There is no documentation at this path.