Can Vuetify's grid system seamlessly integrate with the Bootstrap grid system?

According to information from the Vuetify documentation:

The Vuetify grid draws inspiration from the Bootstrap grid. It involves the use of containers, rows, and columns to organize and align content.

If I utilize Bootstrap grid classes in a Vuetify project, will it function similarly to using Vuetify components like v-container, v-row, and v-col? Essentially, can I copy/paste grid markup from a bootstrap-based project into a Vuetify project's template section and have it work seamlessly?

Based on an experiment showcased in this codepen example, it appears that this might indeed be possible. However, I seek further confirmation through inquiry.

For instance, when comparing the following code snippets for grid layout:

<!-- grid layout via Vuetify components -->
<v-container>
  <v-row justify-content-between>
    <v-col cols="2" class="my-col">One of three columns</v-col>
    <v-col cols="5" class="my-col">One of three columns</v-col>
    <v-col cols class="my-col">One of three columns</v-col>
  </v-row>
</v-container>

<!-- grid layout via bootstrap classes  -->
<div class="container">
  <div class="row">
    <div class="col-2 my-col">One of three columns</div>
    <div class="col-5 my-col">One of three columns</div>
    <div class="col my-col">One of three columns</div>
  </div>
</div>

It is evident that both layouts appear identical within their respective containers.

Although this observation holds true in isolated scenarios, I am interested in knowing whether this generalizes across various instances.

Note: This query pertains to Vuetify version 2 and Bootstrap version 4.

Answer №1

Here's a demonstration using Vuetify:

.my-col {
  background: yellowgreen;
  border: 1px red solid;
}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="75030010011c130c35475b455b4440">[email protected]</a>/dist/vuetify.min.css">

<div class="container my-container">
  <div class="row m-row justify-content-between">
    <div class="col-md-2 my-col">One of three columns</div>
    <div class="col-md-5 my-col">One of three columns</div>
    <div class="col-md-5 my-col">One of three columns</div>
  </div>
</div>

And here is an example with Bootstrap-4:

.my-col {
  background: yellowgreen;
  border: 1px gray solid;
}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  
<div class="container my-container">
  <div class="row m-row justify-content-between">
    <div class="col-md-2 my-col">One of three columns</div>
    <div class="col-md-5 my-col">One of three columns</div>
    <div class="col-md-5 my-col">One of three columns</div>
  </div>
</div>
I've compared both examples for differences between Vuetify and Bootstrap-4, particularly in container width and spacing. Although the class names are similar, there are variations in sizing at different breakpoints. You can replicate the Bootstrap template structure but adjustments need to be made for spacing and other elements.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Applying CSS to an iframe using JavaScript: A Step-by-Step

I have an Iframe editor and I am trying to change some CSS inside the editor. However, when I attempt to apply the CSS, it does not affect the styles within the Iframe. <div id="editor" style="flex: 1 1 0%;"> <iframe src="https://editor.unlay ...

How can the parent div be made transparent without affecting the child div's visibility?

When applying opacity to a parent div, I noticed that it also affects the child div. My intention is to only apply opacity to the parent div. I have set up separate divs for this purpose. <div id="container" style={{backgroundImage:"url('/images ...

When navigating through the state: mutation type is unidentified

Looking to update a state from another module and here is the structure. store.js | |-- yields.js | |--analysis (sub-folder) | | ---actions.js | ---mutations.js | ---state.js To achieve ...

Integrating Vue.js code into Laravel's Blade templates for enhanced functionality

I'm having trouble accessing data from a Vue component function in a Laravel blade template that includes the component. When I use this code, the page just loads as a blank page. However, if I remove the @ symbol from the blade span, the autocomplete ...

Navigating and Displaying Content with Vue.js

Hey there, I am a VueJS newbie and I have a query regarding conditional rendering while using the Cue Router. Here is how my routes are currently set up: const routes = [ { path: '/', component: () => import('layouts/Layout.vue ...

Content in a div with a transparency level set at 50%

Within a div container, I currently have text displayed. The challenge that I'm facing is that the container itself has an opacity of 0.5, and I would like the text to be fully visible with an opacity of 1. Unfortunately, due to the constraints of th ...

CSRF Token currently disabled

I am working on creating a VueJs Form to be included in a php.blade file where users can leave comments and rate between 0 and 5 stars. The challenge I am facing is the possibility of a CSRF attack, even though I have implemented a CSRF token in my form. ...

Troubleshooting z-index conflict when using :before pseudo element to emphasize list entries

I am experiencing an issue with highlighting items in a list generated by JSTree using the :before pseudo element. The z-indexes seem to be causing some trouble, as adjusting them results in the highlighting appearing either behind all links or in front of ...

Modify the image inside a div when hovering

How can I create a product card that displays thumbnails of images when hovered over, and changes the main image to the thumbnail image? My current challenge is getting this functionality to work individually for each card on an e-commerce site. Currently, ...

JavaScript functioning exclusively for specific list items within an unordered list

After implementing JavaScript on my website, I noticed that it only works when clicking on certain list items (li's) and not on others. Specifically, the functionalities for Specialties, Contact Us, and Referral Schemes are not working correctly. ...

Utilize LI styling exclusively for a specific section of the website

Is it possible to style LI items with padding and bullet points only when they are inside the <div class="article-content"> element without affecting other ul/li styles on the website such as the navigation menu? Thank you for your help! .article-co ...

Angular Bootstrapped Navbar with Tab-style Links

I have been working on a project with a specific example: Routing example In my app.component.html file, I made a modification from: <ul class="nav nav-tabs"> to <ul class="nav nav-pills"> Now, the tabs have the appearance of pills. Next ...

What are the most effective techniques for combining Vue.JS and Node.js backends into a single Heroku container?

I came across an interesting blog post today that discusses a method for deploying React applications. The author begins with a Node project and then creates a React project within a subfolder, along with some proxy configuration. About 10 days ago, I did ...

Header Dropdown Problems

Hey there, I have a question regarding my header setup. I currently have two headers in place: Whenever I click the notification button, the dropdown menu seems to disrupt the layout of the header. Here is a screenshot for reference: Below is the CSS cod ...

How can I use Vue.js @scroll to create a dynamic CSS property?

I am developing a vuejs component for my project and I am looking to implement a zoom functionality on scroll within a div, similar to Google Maps. <div @scroll="zoomOnScroll"> <Plotly :data="info" :layout="layout" :display-mode-bar="false"&g ...

Is there a way to connect CSS files from a different directory?

I'm currently in the process of developing a website and I encountered an issue with linking my CSS file, which is stored in a different folder. I originally had it in the same directory as my HTML code, but now I need to figure out how to link it pro ...

What specific CSS selector should be targeted in order to modify the appearance of this button?

I'm attempting to alter the appearance of a button within my Wordpress site, but I've hit a roadblock in identifying the correct element to modify. So far, I've tried targeting: .input#chained-quiz-action-1, however, the button stubbornly re ...

Transforming a Bootstrap Background Image to a Captivating Video Display

Here is the CSS code snippet that I'm having trouble with: .masthead { position: relative; width: 100%; height: auto; min-height: 35rem; padding: 15rem 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 75% ...

The JQuery loading symbol does not prevent keyboard interactions

I successfully implemented a Jquery busy indicator in my application using the following link: However, I noticed that even though it prevents users from clicking on input elements while loading, I can still navigate to these elements by pressing the tab ...

Tips for integrating a logo into router view animations

How can I incorporate a logo into the white fade-in screen that appears when navigating between subpages using <router-view> within App.vue? Here is a simplified version of my App.vue code: <template> <div id="app"> <div ...