Form controls
Text inputs, textareas, and their variants.
Basic input
Use .bima-input on any <input> element inside a .bima-field wrapper.
<div class="bima-field"> <label class="bima-label" for="email">Email address</label> <input type="email" id="email" class="bima-input" placeholder="you@example.com"> </div>
Input types
BIMA styles work with all standard HTML input types.
<input type="text" class="bima-input" placeholder="Enter text"> <input type="number" class="bima-input" placeholder="0"> <input type="password" class="bima-input" placeholder="••••••••"> <input type="search" class="bima-input" placeholder="Search...">
Date & time inputs
Add data-bima-datepicker to a text input for a fully themed calendar — a brand-styled popover that replaces the browser's native (un-themable) date popup. The field becomes read-only and shows a friendly formatted date, while the ISO value (YYYY-MM-DD) is kept on data-value and, when the field has a name, in a hidden mirror input so form submission is unchanged.
<!-- Empty -->
<input type="text" class="bima-input" data-bima-datepicker placeholder="Select a date">
<!-- Pre-filled (ISO) -->
<input type="text" class="bima-input" data-bima-datepicker data-value="2026-05-14">
<!-- Bounded range -->
<input type="text" class="bima-input" data-bima-datepicker
data-min="2026-01-01" data-max="2026-12-31">Use data-bima-timepicker for a themed time popover (scrollable hour/minute columns, Now/Clear) and data-bima-datetimepicker to combine the calendar and time in one popover. Both replace the native pickers and keep an ISO value (HH:MM or YYYY-MM-DDTHH:MM).
<!-- Time (15-minute steps) --> <input type="text" class="bima-input" data-bima-timepicker data-step="15"> <!-- 12-hour format with AM/PM --> <input type="text" class="bima-input" data-bima-timepicker data-format="12"> <!-- Date + time in one popover --> <input type="text" class="bima-input" data-bima-datetimepicker>
Sizes
Use .bima-input--sm for a smaller input and the default class for the standard size.
<input type="text" class="bima-input bima-input--sm" placeholder="Small"> <input type="text" class="bima-input" placeholder="Default">
Disabled state
Add the disabled attribute to prevent interaction.
<input type="text" class="bima-input" placeholder="Disabled" disabled>
Readonly state
Add readonly to prevent editing while keeping the value selectable.
<input type="text" class="bima-input" value="POL-2024-0081" readonly>
Verified state
Add .is-verified once a value has been confirmed. The field settles into a calm brand tint with a check mark — the same reassuring "this is done" cue used across BIMA's guided flows. Works on .bima-input and .bima-select.
<input type="text" class="bima-input is-verified" value="John Mwangi"> <select class="bima-select is-verified" data-bima-select>…</select>
Form sections
Group related fields under a .bima-form-section header. The uppercase label and optional right-aligned action (a trust cue like Secure, or an Edit link) divide a long form into the calm, scannable sections used in BIMA registration and claim flows.
Personal details
Secure<div class="bima-form-section">
<p class="bima-form-section__label">Personal details</p>
<a class="bima-form-section__action" href="#">
<svg>…lock icon…</svg> Secure
</a>
</div>
<div class="bima-field"> … </div>Textarea
Use .bima-textarea on <textarea> elements.
<div class="bima-field">
<label class="bima-label" for="message">Message</label>
<textarea id="message" class="bima-textarea" rows="4"
placeholder="Enter your message..."></textarea>
</div>Help text and error messages
Use .bima-help for assistive hint text and .bima-error-text for validation errors.
<!-- Help text --> <div class="bima-field"> <label class="bima-label" for="username">Username</label> <input type="text" id="username" class="bima-input"> <span class="bima-help">3–20 characters allowed.</span> </div> <!-- Error state --> <div class="bima-field is-invalid"> <label class="bima-label" for="phone">Phone number</label> <input type="tel" id="phone" class="bima-input" aria-invalid="true"> <span class="bima-error-text">Please enter a valid phone number.</span> </div>