Native <input type="radio"> repainted with
appearance: none. The inner dot is drawn with a
radial-gradient background so the control needs no extra
pseudo-element and the dot colour tracks the primary combination across
every theme.
Inner dot diameter as a percentage of the control. Drawn via radial-gradient.
$focus-outline-width
$global-focus-outline-width (2px)
Focus-visible ring width.
$focus-outline-style
$global-focus-outline-style (solid)
Focus ring style.
$focus-outline-offset
$global-focus-outline-offset (2px)
Gap between border and ring.
$disabled-opacity
$global-disabled-opacity (0.6)
Routed through controls.disabledControl().
$border-mix
$global-border-mix (50%)
Border tint vs. currentColor. Clears WCAG 1.4.11 (3:1) on shipped themes.
Override example
app.scss
@use '@adnap/krysalicss/element/radio' with ( $size: 1.125rem, $dot-size: 45%, $border-mix: 60%,);
Tokens consumed
Token
Used for
--kc-primary-bg
Border colour and inner-dot fill when :checked.
--kc-focus-ring
Painted on :focus-visible. Falls back to --kc-fg then currentColor.
--kc-danger-bg
Border tint when the control matches :user-invalid or [aria-invalid="true"].
Accessibility
Anchored on native <input type="radio">: arrow-key navigation between radios of the same name, label-click toggling, and group semantics ship for free.
Selected state is conveyed by both border colour and the inner dot, so the cue isn't colour-only (WCAG 1.4.1).
Always wrap a related set in <fieldset> with <legend> for screen-reader grouping; the framework styles the inputs but does not impose the fieldset.
Focus ring uses --kc-focus-ring with a fallback chain into --kc-fg / currentColor, staying visible across themes (WCAG 2.4.11).
The 1rem hit box is below the WCAG 2.5.5 (44 × 44 px) touch-target floor. Wrap each input in a <label> with a comfortable hit-area.
Forced-colors mode inherits the browser default for native radios; the framework does not repaint inside (forced-colors: active).