# vue-bootstrap4-table **Repository Path**: mirrors_rubanraj54/vue-bootstrap4-table ## Basic Information - **Project Name**: vue-bootstrap4-table - **Description**: Advanced table based on Vue 2 and Bootstrap 4 ⚡️ - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-28 - **Last Updated**: 2025-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 1. vue-bootstrap4-table > Advanced table based on Vue 2 and Bootstrap 4
[Quick Demo in Codepen](https://codepen.io/rubanraj54/full/zyZdzN). [Docs in gitbook](https://rubanraj54.gitbook.io/vue-bootstrap4-table/).  # 2. Features * Multi column filtering (Optimized filtering) * Simple filter * Select filter (Single & Multiple) * Global search * Single & Multi column sorting * Pagination (True! It works out of the box intelligently) * Pagination Information * Checkbox selection for rows * Client & Server mode * Highly customizable Table of Contents ================= - [1. vue-bootstrap4-table](#1-vue-bootstrap4-table) - [2. Features](#2-features) - [3. Installation](#3-installation) * [3.1. Install via npm or yarn](#31-install-via-npm-or-yarn) + [3.1.1. Dependencies](#311-dependencies) * [3.2. Install via CDN](#32-install-via-cdn) - [4. Basic Usage](#4-basic-usage) - [5. Columns](#5-columns) * [5.1. Basic structure](#51-basic-structure) * [5.2. Attributes details](#52-attributes-details) * [5.3. Column slot](#53-column-slot) + [5.3.1. Example](#531-example) + [5.3.2. Note](#532-note) + [5.3.3. props](#533-props) - [6. Rows](#6-rows) * [6.1. Basic structure](#61-basic-structure) * [6.2. Row Slot](#62-row-slot) + [6.2.1. Example](#621-example) + [6.2.2. Note](#622-note) + [6.2.3. props](#623-props) * [6.3. Empty result message slot](#63-empty-result-message-slot) + [6.3.1. Example](#631-example) - [7. Sorting](#7-sorting) * [7.1. Example](#71-example) * [7.2. Attributes details](#72-attributes-details) * [7.3. Single column sorting](#73-single-column-sorting) * [7.4. Multi column sorting](#74-multi-column-sorting) + [7.4.1. Example](#741-example) * [7.5. Slot](#75-slot) + [7.5.1. Sort Icon](#751-sort-icon) - [7.5.1.1. Example](#7511-example) - [8. Filtering](#8-filtering) * [8.1. Simple Filter](#81-simple-filter) + [8.1.1. Example](#811-example) + [8.1.2. Attributes details](#812-attributes-details) + [8.1.3. Clear button icon slot](#813-clear-button-icon-slot) * [8.2. Multi-Select Filter](#82-multi-select-filter) + [8.2.1. Example (Single select)](#821-example--single-select-) + [8.2.2. Example (Multi select)](#822-example--multi-select-) + [8.2.3. Attribute details](#823-attribute-details) - [9. Global search](#9-global-search) * [9.1. Example](#91-example) * [9.2. Attributes details](#92-attributes-details) * [9.3. Clear button icon slot](#93-clear-button-icon-slot) - [10. Pagination & Info](#10-pagination---info) * [10.1. Example](#101-example) * [10.2. Attributes details](#102-attributes-details) * [10.3. Slot](#103-slot) + [10.3.1. Previous & Next button](#1031-previous---next-button) + [10.3.2. Pagination info](#1032-pagination-info) - [10.3.2.1. props](#10321-props) + [10.3.3. Selected rows info](#1033-selected-rows-info) - [10.3.3.1. props](#10331-props) - [11. Refresh and Reset button](#11-refresh-and-reset-button) * [11.1. Refresh Button](#111-refresh-button) + [11.1.1. Example](#1111-example) * [11.2. Reset button](#112-reset-button) * [11.3. Slots](#113-slots) + [11.3.1. Button text and icons](#1131-button-text-and-icons) - [11.3.1.1. Example](#11311-example) - [12. Custom action buttons](#12-custom-action-buttons) * [12.1. Example](#121-example) * [12.2. Attributes details](#122-attributes-details) - [13. Custom classes](#13-custom-classes) * [13.1. Example](#131-example) - [14. vbt-classes](#14-vbt-classes) * [14.1. vbt-row-selected](#141-vbt-row-selected) * [14.2. vbt-table-wrapper](#142-vbt-table-wrapper) - [15. Config](#15-config) * [15.1. Example](#151-example) * [15.2. Attributes details](#152-attributes-details) - [16. Server mode](#16-server-mode) * [16.1. Example](#161-example) + [16.1.1. Step 1](#1611-step-1) + [16.1.2. Step 2](#1612-step-2) + [16.1.3. Step 3](#1613-step-3) + [16.1.4. Step 4](#1614-step-4) + [16.1.5. Note](#1615-note) * [16.2. Loader overlay](#162-loader-overlay) - [17. Events](#17-events) * [17.1. on-select-row](#171-on-select-row) + [17.1.1. Payload (Object)](#1711-payload--object-) * [17.2. on-all-select-rows](#172-on-all-select-rows) + [17.2.1. Payload (Object)](#1721-payload--object-) * [17.3. on-unselect-row](#173-on-unselect-row) + [17.3.1. Payload (Object)](#1731-payload--object-) * [17.4. on-all-unselect-rows](#174-on-all-unselect-rows) + [17.4.1. Payload (Object)](#1741-payload--object-) * [17.5. refresh-data](#175-refresh-data) - [18. Build Setup](#18-build-setup) # 3. Installation ## 3.1. Install via npm or yarn **`$ npm i vue-bootstrap4-table --save`** **`$ yarn add vue-bootstrap4-table`** Currently this package will install only the vue-bootstrap4-table component, not their dependencies. So make sure to install the following dependencies. ### 3.1.1. Dependencies - bootstrap 4 (js and css) You should include bootstrap before vue-bootstrap4-table plugin. We are using **`lodash`** internally, so you don't need to install separately for this plugin. ## 3.2. Install via CDN ```html ... ... ``` **Note:** If you've included bootstrap & jQuery packages already in your project, then include only **vue-bootstrap4-table.min.js** script. # 4. Basic Usage It is easy to include vue-bootstrap4-table as a component in your application. Import VueBootstrap4Table component in any of your vue component and start using it right away. **Note:** If you included the library via CDN, then you don't need to import, you can use **`vue-bootstrap4-table`** component right away. **`rows`** and **`columns`** props should be passed down to **`vue-bootstrap4-table`** component to work with the table. ```vue`** elements for table outer div element, table, row, and cell properties respectively. You can either pass the custom classes directly or pass a function with your condition check to decide whether to apply to class or not. For example, in the above example, look at the property **`cell`**. There we are applying classes **"my-cell my-cell2"** directly to **` | `** element and **"text-danger"** class only to the "salary" column & also the salary value should be above 2500. # 14. vbt-classes By default, vue-bootstrap-table add classes to table elements which allows users to override the default styles. ## 14.1. vbt-row-selected If a row is being selected with checkbox or row, then the selected row |