Bootstrap to Modern (Tailwind + Alpine.js) / Refaktor Bootstrap ke Modern
English | Bahasa Indonesia
English
Description
This skill transforms legacy web applications styled with Bootstrap (jQuery-dependent or pure CSS) into a modern, utility-first architecture using Tailwind CSS v4 for styling and Alpine.js for lightweight reactive behavior.
Instructions
- Analyze the Legacy Structure:
- Identify the version of Bootstrap being used.
- Locate custom CSS files that override Bootstrap defaults.
- Identify interactive components (modals, dropdowns, tooltips, tabs, carousels) that rely on Bootstrap's JavaScript or jQuery.
- Setup Modern Tools:
- Ensure Tailwind CSS v4 is properly set up in the project (e.g., via CDN for simple projects, or PostCSS/Vite for build steps).
- Inject Alpine.js via CDN or module bundler to handle interactivity.
- Migration Strategy:
- Grid & Layout: Convert Bootstrap grids (
container, row, col-*) to Tailwind flexbox (flex, flex-col, gap-*) or CSS Grid (grid, grid-cols-*).
- Spacing & Typography: Map Bootstrap spacing (
m-3, p-4) to Tailwind spacing (m-4, p-6—noting scale differences). Map typography utilities (text-center, font-weight-bold) to Tailwind equivalents (text-center, font-bold).
- Colors: Update Bootstrap semantic colors (
primary, success, danger) to Tailwind color palettes (e.g., blue-600, green-500, red-500) or define custom themes in CSS variables for Tailwind v4.
- Components: Rebuild Bootstrap components (cards, buttons, alerts, navbars) using Tailwind utility classes to match or improve the original design.
- Interactivity with Alpine.js:
- Remove jQuery and Bootstrap JS dependencies.
- Replace interactive Bootstrap components with Alpine.js data and directives.
- Dropdowns: Use
x-data="{ open: false }" and @click="open = !open".
- Modals: Use Alpine.js to manage the open state and handle background overlays and click-away events (
@click.outside).
- Tabs: Manage active tab state with
x-data="{ tab: 'home' }".
- UI/UX Modernization & Skill Integration:
- Do NOT just do a 1:1 translation of Bootstrap classes. The goal is to elevate the design.
- You MUST orchestrate and apply guidelines from other UI/UX skills (
ui-ux-expert, ui-ux-pro-max, and hig).
- Implement Human Interface Guidelines (HIG) principles: Hierarchy, Harmony, and Consistency.
- Use vibrant colors, smooth micro-animations, glassmorphism (if appropriate), and modern typography to "WOW" the user.
- Quality Assurance:
- Verify that responsive design behaves correctly across breakpoints (
sm:, md:, lg:).
- Ensure interactive components (modals, dropdowns) feel premium with Alpine.js transitions (
x-transition).
Trigger Conditions
Active whenever the user asks to migrate, refactor, or update a Bootstrap project to Tailwind CSS, or modernize legacy CSS/JS.
Bahasa Indonesia
Integrasi Orkestrasi
Terhubung dan mengorkestrasi skill domain yang relevan seperti brainstorming, zero-to-prod-orchestrator, dan project-context-mapper untuk memastikan eksekusi yang kohesif.
Deskripsi
Skill ini mengubah aplikasi web lama yang di-style dengan Bootstrap (baik yang bergantung pada jQuery maupun murni CSS) menjadi arsitektur modern berbasis utility menggunakan Tailwind CSS v4 untuk styling dan Alpine.js untuk behavior reaktif yang ringan.
Instruksi
- Analisis Struktur Lama:
- Identifikasi versi Bootstrap yang digunakan.
- Temukan file CSS kustom yang menimpa (override) default Bootstrap.
- Identifikasi komponen interaktif (modal, dropdown, tooltip, tab, carousel) yang mengandalkan JavaScript Bootstrap atau jQuery.
- Setup Tools Modern:
- Pastikan Tailwind CSS v4 disiapkan dengan benar di proyek (misalnya, melalui CDN untuk proyek sederhana, atau PostCSS/Vite jika ada build step).
- Masukkan Alpine.js melalui CDN atau module bundler untuk menangani interaktivitas.
- Strategi Migrasi:
- Grid & Layout: Ubah grid Bootstrap (
container, row, col-*) menjadi flexbox Tailwind (flex, flex-col, gap-*) atau CSS Grid (grid, grid-cols-*).
- Spacing & Tipografi: Petakan spasi Bootstrap (
m-3, p-4) ke Tailwind (m-4, p-6—perhatikan perbedaan skala). Petakan utilitas teks (text-center, font-weight-bold) ke padanan Tailwind (text-center, font-bold).
- Warna: Perbarui warna semantik Bootstrap (
primary, success, danger) ke palet warna Tailwind (misal: blue-600, green-500, red-500) atau definisikan tema kustom di variabel CSS untuk Tailwind v4.
- Komponen: Bangun ulang komponen Bootstrap (card, button, alert, navbar) menggunakan kelas utilitas Tailwind untuk mencocokkan atau memperbaiki desain aslinya.
- Interaktivitas dengan Alpine.js:
- Hapus dependensi jQuery dan Bootstrap JS.
- Ganti komponen interaktif Bootstrap dengan data dan direktif Alpine.js.
- Dropdown: Gunakan
x-data="{ open: false }" dan @click="open = !open".
- Modal: Gunakan Alpine.js untuk mengelola state terbuka, overlay latar belakang, dan event klik di luar (
@click.outside).
- Tab: Kelola state tab aktif dengan
x-data="{ tab: 'home' }".
- Modernisasi UI/UX & Integrasi Skill:
- JANGAN hanya menerjemahkan kelas Bootstrap 1:1. Tujuannya adalah meningkatkan kualitas desain.
- Anda WAJIB mengorkestrasi dan menerapkan pedoman dari skill UI/UX lainnya (
ui-ux-expert, ui-ux-pro-max, dan hig).
- Terapkan prinsip Human Interface Guidelines (HIG): Hierarchy, Harmony, dan Consistency.
- Gunakan warna cerah, mikro-animasi halus, glassmorphism (jika sesuai), dan tipografi modern untuk memberikan kesan "WOW" pada pengguna.
- Quality Assurance:
- Verifikasi bahwa desain responsif berfungsi dengan benar di semua breakpoint (
sm:, md:, lg:).
- Pastikan komponen interaktif (modal, dropdown) terasa premium dengan transisi Alpine.js (
x-transition).
Kondisi Pemicu
Aktif setiap kali pengguna meminta untuk memigrasi, merefaktor, atau memperbarui proyek Bootstrap ke Tailwind CSS, atau memodernisasi CSS/JS lama.
Orchestration & Integration
- Integrates with:
ui-ux-expert, ui-ux-pro-max, hig.
1---2name: bootstrap-to-modern3description: Expert skill to refactor and migrate legacy Bootstrap CSS applications to modern stacks using Tailwind CSS v4 and Alpine.js / Skill ahli untuk melakukan refaktor dan migrasi aplikasi Bootstrap CSS lama ke stack modern menggunakan Tailwind CSS v4 dan Alpine.js.4---56# Bootstrap to Modern (Tailwind + Alpine.js) / Refaktor Bootstrap ke Modern78[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)910---1112<a name="english"></a>13## English1415### Description16This skill transforms legacy web applications styled with Bootstrap (jQuery-dependent or pure CSS) into a modern, utility-first architecture using **Tailwind CSS v4** for styling and **Alpine.js** for lightweight reactive behavior.1718### Instructions191. **Analyze the Legacy Structure**:20 - Identify the version of Bootstrap being used.21 - Locate custom CSS files that override Bootstrap defaults.22 - Identify interactive components (modals, dropdowns, tooltips, tabs, carousels) that rely on Bootstrap's JavaScript or jQuery.232. **Setup Modern Tools**:24 - Ensure **Tailwind CSS v4** is properly set up in the project (e.g., via CDN for simple projects, or PostCSS/Vite for build steps).25 - Inject **Alpine.js** via CDN or module bundler to handle interactivity.263. **Migration Strategy**:27 - **Grid & Layout**: Convert Bootstrap grids (`container`, `row`, `col-*`) to Tailwind flexbox (`flex`, `flex-col`, `gap-*`) or CSS Grid (`grid`, `grid-cols-*`).28 - **Spacing & Typography**: Map Bootstrap spacing (`m-3`, `p-4`) to Tailwind spacing (`m-4`, `p-6`—noting scale differences). Map typography utilities (`text-center`, `font-weight-bold`) to Tailwind equivalents (`text-center`, `font-bold`).29 - **Colors**: Update Bootstrap semantic colors (`primary`, `success`, `danger`) to Tailwind color palettes (e.g., `blue-600`, `green-500`, `red-500`) or define custom themes in CSS variables for Tailwind v4.30 - **Components**: Rebuild Bootstrap components (cards, buttons, alerts, navbars) using Tailwind utility classes to match or improve the original design.314. **Interactivity with Alpine.js**:32 - Remove jQuery and Bootstrap JS dependencies.33 - Replace interactive Bootstrap components with Alpine.js data and directives.34 - **Dropdowns**: Use `x-data="{ open: false }"` and `@click="open = !open"`.35 - **Modals**: Use Alpine.js to manage the open state and handle background overlays and click-away events (`@click.outside`).36 - **Tabs**: Manage active tab state with `x-data="{ tab: 'home' }"`.375. **UI/UX Modernization & Skill Integration**:38 - Do NOT just do a 1:1 translation of Bootstrap classes. The goal is to elevate the design.39 - You MUST orchestrate and apply guidelines from other UI/UX skills (`ui-ux-expert`, `ui-ux-pro-max`, and `hig`).40 - Implement Human Interface Guidelines (HIG) principles: Hierarchy, Harmony, and Consistency.41 - Use vibrant colors, smooth micro-animations, glassmorphism (if appropriate), and modern typography to "WOW" the user.426. **Quality Assurance**:43 - Verify that responsive design behaves correctly across breakpoints (`sm:`, `md:`, `lg:`).44 - Ensure interactive components (modals, dropdowns) feel premium with Alpine.js transitions (`x-transition`).4546### Trigger Conditions47Active whenever the user asks to migrate, refactor, or update a Bootstrap project to Tailwind CSS, or modernize legacy CSS/JS.4849---5051<a name="bahasa-indonesia"></a>52## Bahasa Indonesia5354### Integrasi Orkestrasi55Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.5657### Deskripsi58Skill ini mengubah aplikasi web lama yang di-style dengan Bootstrap (baik yang bergantung pada jQuery maupun murni CSS) menjadi arsitektur modern berbasis utility menggunakan **Tailwind CSS v4** untuk styling dan **Alpine.js** untuk behavior reaktif yang ringan.5960### Instruksi611. **Analisis Struktur Lama**:62 - Identifikasi versi Bootstrap yang digunakan.63 - Temukan file CSS kustom yang menimpa (override) default Bootstrap.64 - Identifikasi komponen interaktif (modal, dropdown, tooltip, tab, carousel) yang mengandalkan JavaScript Bootstrap atau jQuery.652. **Setup Tools Modern**:66 - Pastikan **Tailwind CSS v4** disiapkan dengan benar di proyek (misalnya, melalui CDN untuk proyek sederhana, atau PostCSS/Vite jika ada build step).67 - Masukkan **Alpine.js** melalui CDN atau module bundler untuk menangani interaktivitas.683. **Strategi Migrasi**:69 - **Grid & Layout**: Ubah grid Bootstrap (`container`, `row`, `col-*`) menjadi flexbox Tailwind (`flex`, `flex-col`, `gap-*`) atau CSS Grid (`grid`, `grid-cols-*`).70 - **Spacing & Tipografi**: Petakan spasi Bootstrap (`m-3`, `p-4`) ke Tailwind (`m-4`, `p-6`—perhatikan perbedaan skala). Petakan utilitas teks (`text-center`, `font-weight-bold`) ke padanan Tailwind (`text-center`, `font-bold`).71 - **Warna**: Perbarui warna semantik Bootstrap (`primary`, `success`, `danger`) ke palet warna Tailwind (misal: `blue-600`, `green-500`, `red-500`) atau definisikan tema kustom di variabel CSS untuk Tailwind v4.72 - **Komponen**: Bangun ulang komponen Bootstrap (card, button, alert, navbar) menggunakan kelas utilitas Tailwind untuk mencocokkan atau memperbaiki desain aslinya.734. **Interaktivitas dengan Alpine.js**:74 - Hapus dependensi jQuery dan Bootstrap JS.75 - Ganti komponen interaktif Bootstrap dengan data dan direktif Alpine.js.76 - **Dropdown**: Gunakan `x-data="{ open: false }"` dan `@click="open = !open"`.77 - **Modal**: Gunakan Alpine.js untuk mengelola state terbuka, overlay latar belakang, dan event klik di luar (`@click.outside`).78 - **Tab**: Kelola state tab aktif dengan `x-data="{ tab: 'home' }"`.795. **Modernisasi UI/UX & Integrasi Skill**:80 - JANGAN hanya menerjemahkan kelas Bootstrap 1:1. Tujuannya adalah meningkatkan kualitas desain.81 - Anda WAJIB mengorkestrasi dan menerapkan pedoman dari skill UI/UX lainnya (`ui-ux-expert`, `ui-ux-pro-max`, dan `hig`).82 - Terapkan prinsip Human Interface Guidelines (HIG): Hierarchy, Harmony, dan Consistency.83 - Gunakan warna cerah, mikro-animasi halus, glassmorphism (jika sesuai), dan tipografi modern untuk memberikan kesan "WOW" pada pengguna.846. **Quality Assurance**:85 - Verifikasi bahwa desain responsif berfungsi dengan benar di semua breakpoint (`sm:`, `md:`, `lg:`).86 - Pastikan komponen interaktif (modal, dropdown) terasa premium dengan transisi Alpine.js (`x-transition`).8788### Kondisi Pemicu89Aktif setiap kali pengguna meminta untuk memigrasi, merefaktor, atau memperbarui proyek Bootstrap ke Tailwind CSS, atau memodernisasi CSS/JS lama.909192## Orchestration & Integration93- Integrates with: `ui-ux-expert`, `ui-ux-pro-max`, `hig`.