Skip to main content
VelinStyle v1.3.0
⌂ Home
  1. Docs
  2. Migration & Release
  3. Migration Guide

Migration Guide Tutorial

Switch from Bootstrap or Tailwind to VelinStyle — step by step. Beginners can follow the path top to bottom; pros can jump to the mapping tables and CLI. Deutsch: Migrationsleitfaden

What you get: clearer component classes (velin-btn), fewer utility stacks, and AAA color defaults. Version bumps inside VelinStyle → use Upgrading instead.

Who is this for?

Pick your starting point

  1. I use Bootstrap — replace .btn / .card with Velin components, then utilities.
  2. I use Tailwind — shrink class salads into components; prefix remaining utilities with velin-.
  3. Mixed / existing app — load VelinStyle side-by-side first (npm or CDN).
  4. Already on VelinStyle — this page is not for version upgrades.

Beginner path (about 30–60 min)

Do these in order. Stop after each step and check the page still looks OK.

  1. Add VelinStyle — install or CDN from Download. Keep Bootstrap/Tailwind for now.
  2. Rewrite one control — change a primary button to velin-btn velin-btn--primary (see quick win).
  3. Utilities — swap spacing/display classes using the tables below (or run the CLI dry-run).
  4. Components — migrate navbar, cards, alerts, forms with the component table + linked docs.
  5. Layout & theme — containers/grid + data-velin-theme (see layout section).
  6. Remove the old stack — when coverage is good, drop Bootstrap/Tailwind CSS/JS from the bundle.

Stuck? Troubleshooting · FAQ · BirdAPI Tutorials.

Before you start (2 minutes)

Good to know: AAA color defaults

VelinStyle ships AAA contrast tokens (about 7:1 text on bright surfaces). If older muted/pastel colors look “too strong”, opt down:

<html data-velin-contrast="aa">

Details: Accessibility.

Quick win: one button

Same intent — three ways to write it. VelinStyle packs look & focus into fewer classes.

<button class="btn btn-primary">Save</button>
<button class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
  Save
</button>
<button class="velin-btn velin-btn--primary">Save</button>

Why migrate? Less class salad

Heavy Tailwind often means 10–15 classes per control. VelinStyle is component-first: semantic classes carry layout, color, hover, and focus — utilities stay for one-offs.

<!-- Tailwind sprawl -->
<button class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
  Save
</button>

<!-- VelinStyle -->
<button class="velin-btn velin-btn--primary">Save</button>

How VelinStyle classes work

Utilities use a velin- prefix (e.g. velin-flex) to avoid clashes. Components use BEM-style velin-* names (velin-btn, velin-card) — not Bootstrap’s unprefixed btn / card. Use the tables as find-and-replace starters, then open the linked docs for full markup.

Reference: Tailwind → utilities

Add velin- where an analogue exists. Spacing steps are not identical to Tailwind rem defaults — spot-check 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 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 index: Utilities API · Spacing.

Reference: Bootstrap → utilities

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-primaryDesign tokens
.text-muted.velin-text-mutedSemantic text
.rounded.velin-roundedDefault radius
.shadow.velin-shadow

Remember: Bootstrap component classes (.btn, .card) do not map 1:1 — use the next table.

Reference: Bootstrap → components

BootstrapVelinStyleDoc
.btn / .btn-primary.velin-btn .velin-btn--primaryButtons
.modal / .modal-dialog.velin-modal-overlay + .velin-modalModal · <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--primaryBadge
.form-control.velin-inputForm control
.list-group.velin-list-group + .velin-list-group__itemList group

Layout & themes

Extras you gain

Pro tip: CLI velinstyle prefix

Rewrites class / className in HTML, Vue, JSX, TSX. Dry-run is default; add --write to apply.

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

More: CLI docs · project wiring: Existing project.

Checklist

  1. Add VelinStyleCSS + optional JS
  2. Side-by-side — keep the old stack until coverage is good
  3. One component — button / card smoke test
  4. Utilities — tables or prefix dry-run
  5. Components — markup to velin-* patterns
  6. Remove old CSS — drop Bootstrap/Tailwind when ready
  7. Then upgrade notesUpgrading for current release details

Need longer walkthroughs? BirdAPI Tutorials · snippets in the CodeGewölbe.