Skip to main content
VelinStyle v0.8.0
⌂ Home
  1. Docs
  2. Migration
  3. Migration Guide

Migration Guide

Mechanical mappings from Tailwind and Bootstrap to VelinStyle — utilities, components, layout, and themes — so you can switch without guesswork.

Overview

VelinStyle uses a velin- prefix on utilities to avoid collisions. Components use velin-* BEM-style classes (e.g. velin-btn, velin-card) — not the unprefixed Bootstrap names. Use the tables below as find-and-replace starters; then open the linked docs for markup structure.

Migration in 5 minutes

Same primary button — three styles. VelinStyle bundles intent into fewer, semantic classes (especially for buttons).

<button class="btn btn-primary">Save</button>
<button class="px-4 py-2 bg-blue-500 text-white rounded">
  Save
</button>
<button class="velin-btn velin-btn--primary">Save</button>

Tailwind → VelinStyle utilities

Prefix Tailwind-style utilities with velin- where a direct analogue exists. Spacing scales are not identical to Tailwind’s default rem steps — spot-check in the browser after bulk replace.

TailwindVelinStyleNotes
p-4.velin-p-4Padding scale
text-center.velin-text-centerSame intent
bg-blue-500.velin-bg-primarySemantic token vs. arbitrary color
rounded-lg.velin-rounded-lgRadius tokens
flex.velin-flexOr layout helpers .velin-flex--*
hidden.velin-hidden
mt-4.velin-mbs-4 or .velin-m-4Logical mbs = margin-block-start; see Spacing
shadow-md.velin-shadowSee Shadows
max-w-md.velin-max-w-mdWidth caps
opacity-50.velin-opacity-50

Full utility index: Utilities API · spacing detail: Spacing.

Bootstrap → VelinStyle utilities

Display, spacing, typography, and color utilities map predictably once you add the prefix.

BootstrapVelinStyleNotes
.d-flex.velin-flexDisplay utility
.d-none.velin-hiddenSame behavior
.mt-3.velin-mbs-4 or .velin-m-3Check spacing scale
.p-4.velin-p-4
.text-center.velin-text-center
.bg-primary.velin-bg-primaryUses design tokens
.text-muted.velin-text-mutedSemantic text color
.rounded.velin-roundedDefault radius
.shadow.velin-shadow

Remember: Bootstrap component classes (.btn, .card) do not carry over one-to-one — use the component table below.

Bootstrap → VelinStyle components

VelinStyle is a full UI kit: CSS components plus optional Web Components. Start from the doc page for each pattern.

BootstrapVelinStyleDoc
.btn / .btn-primary.velin-btn .velin-btn--primaryButtons
.modal / .modal-dialog.velin-modal-overlay + .velin-modal (+ BEM parts)Modal · imperative <velin-dialog>
.alert / .alert-info.velin-alert .velin-alert--infoAlerts
.navbar.velin-nav + .velin-nav__*Navbar
.card.velin-card + .velin-card__*Card
.badge.velin-badge .velin-badge--primary (etc.)Badge
.form-control.velin-input (+ modifiers)Form control
.list-group.velin-list-group + .velin-list-group__itemList group

Layout & theme migration

VelinStyle unique features

Extras you get beyond Bootstrap/Tailwind parity:

CLI: mechanical class migration (velinstyle prefix)

The CLI can rewrite class and className in HTML, Vue, JSX, and TSX: it adds velin- where a matching utility exists, optionally maps Bootstrap d-* display classes with --bootstrap-display, and loads an explicit JSON map for everything else.

npx velinstyle prefix ./src
npx velinstyle prefix ./src --write
npx velinstyle prefix ./src --bootstrap-display --write
npx velinstyle prefix ./src --map ./velinstyle-prefix-map.json --write

If velinstyle-prefix-map.json sits in the directory you pass, it is loaded automatically. Use --map to merge a custom file. Dry-run is the default; add --write to apply changes.

Migration checklist

  1. Add VelinStyleCSS + optional components JS
  2. Run side-by-side — layers + prefixed utilities reduce collisions
  3. Utilities first — replace display/spacing/type using the tables above
  4. Then components — swap markup to velin-* patterns (see doc links)
  5. IntegrateExisting project guide · CLI (scan, blueprints)
  6. Remove old CSS — when coverage is complete, drop Bootstrap/Tailwind from the bundle

Theme wählen