Skip to main content
Batoi UIF Docs

Bootstrap-to-UIF CSS Migration

Native equivalents, markup changes, and unsupported Bootstrap assumptions.

Version 3.0.0 Version 3 active maintenance Reviewed Aug 11, 2026 Next review Nov 11, 2026

Owner: Batoi Engineering Reviewed by: Batoi UIF Maintainers Source revision: b2f3478

Browse Batoi UIF Documentation Bootstrap-to-UIF CSS Migration

Bootstrap-to-UIF CSS Migration

This maps common Bootstrap conventions to the bundled UIF 3 CSS. It is a migration guide, not a Bootstrap compatibility promise. Visual dimensions, breakpoints, and spacing values are not necessarily identical. Do not add Bootstrap as a runtime dependency.

Component mappings

Bootstrap patternUIF patternMigration requirement
btn btn-primaryuif-btnPrimary is the base style
btn btn-secondaryuif-btn uif-btn-secondaryUIF secondary is a bordered surface, not a gray filled button
btn btn-outline-primaryuif-btn uif-btn-outline-primaryKeep the base class
btn-sm, btn-lguif-btn-sm, uif-btn-lgAdd to the base button
disabled classNative disabled on buttonsA CSS class cannot disable behavior
form-control, form-selectuif-inputApply to input, textarea, or select; keep labels
form-checkNative checkbox inside uif-selection-controlAdapt markup, not just the class name
is-invalidaria-invalid="true" on uif-inputAdd associated uif-field-error text
carduif-cardUse uif-card-flush for padded child sections
card-header, card-body, card-footeruif-card-head, uif-card-body, uif-panel-footerPreserve semantic header/body/footer structure
badge bg-successuif-badge uif-badge-successAlso supply meaningful status text
tableuif-tableRetain caption and header scopes
table-responsiveuif-table-wrapOverflow wrapper, not the table itself
navbaruif-navbarAdapt brand/actions markup; collapse behavior is not automatic
data-bs-* attributesNo direct CSS equivalentRebuild using the documented UIF behavior contract

Utility mappings

BootstrapUIFNotes
d-flexuif-flexUIF adds a default gap
d-noneuif-hiddenRemoves content from layout and accessibility tree
d-blockuif-blockDisplay only
flex-columnuif-flex-colAlso establishes flex layout
flex-wrapuif-flex-wrapAdd to a flex container
align-items-centeruif-items-centerAlignment only
justify-content-betweenuif-justify-betweenDistribution only
text-start, text-endFeature CSS text-align: start/endNative uif-text-left/right are physical directions
text-centeruif-text-centerCenter alignment
m-0…5, p-0…5uif-m-0…5, uif-p-0…5UIF token scale differs; inspect spacing
mt-*, mb-*, ms-*, me-*Same suffix with uif-Values 0–5; start/end are logical
px-*, py-*uif-px-*, uif-py-*Values 0–5
gap-1…5uif-gap-1…5Not necessarily the same pixel values
w-100uif-w-fullFull width
visually-hiddenuif-sr-onlyRetains accessible content
row + col-6uif-form-grid-12 + uif-col-6CSS grid, not Bootstrap flex rows/gutters
col-md-6, d-lg-noneFeature media-query CSSDo not invent prefixed responsive aliases

There is no blanket conversion for every Bootstrap utility, JavaScript plugin, assessment layout, or theme class. See Utilities for actual responsive behavior and Forms for validation semantics.

Migration sequence

Inventory the existing page's Bootstrap and application-only classes. Replace one component at a time, compare its markup and behavior, then remove unused dependencies only after checking the entire shell. Verify focus, keyboard actions, errors, mobile layouts, and printed output. A screen that looks correct while Bootstrap is still loaded has not proven that migration is complete.