Designing multiple button actions in v-card-actions in Vuetify: A step-by-step guide

Trying to streamline the v-card-actions on my Vuetify v-cards. My aim is to center the test button within the v-card and position it above the like and share "footer" buttons. I want the like and share footer buttons to be at the bottom of the v-card with space between them.

I attempted to place the "footer" using

<v-flex class="d-flex justify-space-between mx-4">...</v-flex>
in the v-card actions section, and utilized CSS properties such as absolute positioning and bottom based on guidance from another user in this response here: https://codesandbox.io/s/vue-template-jsodz?fontsize=14. However, after these modifications, the buttons lost their centered alignment and the spacing between them vanished.

The picture illustrates my desired layout where both the footer and Test buttons are placed at the bottom of the card. Despite my attempts, either the test button did not center properly or the division between the footer buttons got disrupted. https://i.sstatic.net/8AomX.jpg This snippet represents the code that has yielded the best visual result thus far:

  <v-layout row wrap>
    <v-flex xs12 sm6 md4 lg3 v-for="project in filteredProjects" :key="project.title">
      <v-card class="ma-3" hover height="95%" >
        <v-card-text>
          ...
        </v-card-text>
        <v-card-actions>
          <v-col class="text-center">
            <v-btn class="green accent-4 white--text">                  
              <span class="">Test</span>                  
            </v-btn>
          </v-col>
        </v-card-actions>
        <v-flex class="d-flex justify-space-between mx-4">
          <div>
            <v-btn icon>
              <v-icon>thumb_up</v-icon>
            </v-btn>
            <span class="text-md-subtitle-2 black--text font-weight-bold ">{{ project.upvoteCount }}</span>
            <v-btn icon>
              <v-icon>thumb_down</v-icon>
            </v-btn>
            <span class="text-md-subtitle-2 black--text font-weight-bold ">{{ project.downvoteCount }}</span>
          </div>
          <div>
            <v-btn icon>
              <v-icon>share</v-icon>
            </v-btn>
            <span class="text-md-subtitle-2 black--text font-weight-bold">Teilen</span>
          </div>
        </v-flex>
      </v-card>
    </v-flex>
  </v-layout>

Your suggestions are greatly appreciated! Warm regards.

Answer №1

Hey @FacelessTimma, if you want to move the card actions to the bottom using Vuetify, you can utilize some CSS helpers.

To achieve this, make sure to integrate flex-row or flex-column classes with d-flex for proper alignment.

Also, remember to apply the class="grow" so that dynamic content can expand within your cards.

In the code provided below, notice how we use: class="d-flex flex-row" in each column, class="d-flex flex-column" in each card, and class="grow" in each v-card-text component

Refer to the functional code snippet below:

<!-- Insert Working Code Here -->

For a live demonstration, check out the following link: Vuetify Card Actions at Bottom

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

Can you guide me on setting a background image URL for rails using javascript?

Within my Rails application, I have a collection of content paired with image buttons (each piece of content has an associated image). When a user clicks on one of these buttons, my goal is to display the corresponding image. All of my images are stored u ...

What is the best way to handle texture loading delays in Three.js when using a JSON model?

Currently, I have successfully loaded a JSON model based on AlteredQualia's skinning example. However, I am looking to hide the model until it is fully loaded. In the provided example, the models are displayed before their texture resources finish loa ...

Validating data for Telegram Web Bots using JavaScript

Struggling with creating a user verification script for my Telegram web app bots. Need help troubleshooting. import sha256 from 'js-sha256' const telegram = window.Telegram.WebApp const bot_token = '<bot-token>' const data_check_ ...

Implementing a sibling combinator technique within Material UI's useStyles framework

Is there a way to change the background of one div when hovering over another using material ui? The traditional CSS method is: #a:hover ~ #b { background: #ccc; } Here is my attempt with Material UI: const useStyles = makeStyles(theme => ({ ...

What is the best way to retrieve a selected value from one dropdown list and populate it into another dropdown

Can someone assist me with retrieving the selected answer from one drop-down list and populating it into another drop-down list? Below is my code for programming groups A and B: Example: If a user selects an option from group A and group B, I would li ...

Showing nested JSON data in ng-repeat

Currently, I'm struggling to understand how to access nested JSON and show it on a page using Angular. For instance, consider the JSON structure below where I want to display connectivity products under portfolio using ng-repeat... { "addons": [ ...

Tips for displaying a tooltip when hovering over a label in a Material UI slider

I'm currently working on a slider quiz and my goal is to have the tooltip appear when hovering over the label on the slider. Currently, I can only see the tooltip when I hover directly on the thumb at the location of my mouse. Refer to the image belo ...

How to validate text from a <span> tag using Selenium WebDriver and JavaScript

Is there a way to retrieve the value from the span tag using this code snippet? var error = driver.findElement(webdriver.By.id('error-container-text')).getAttribute('innerHTML'); When I run the above code, I get a response that looks ...

What is the best way to incorporate multiple variables in a MySQL query when using Node.js?

I'm facing a challenge where I need to input student data into a table using the parent key as a foreign key. The parent information is included in the same JSON object, with an array of students inside it. My goal is to retrieve the parent Id from th ...

Efficiently manage and switch between multiple VueJS applications on a single page without any redirection needed

In the process of developing an extensive project that consists of multiple VueJS applications, each with its own router and store. Access to these applications is through URLs like: https://baseurl.com/app1/#/ https://baseurl.com/app2/#/ https://baseurl ...

a new approach for creating a conditional function in pointfree fashion

Can someone help me convert this code into a pointfree style? To provide context: The function receives an Array of Either types and returns a Task type. If any of the Either types have the left set, the Task type is rejected with that value. If none of t ...

What is the best way to configure my Express API endpoint so that it can generate customized responses based on the parameters in the URL?

Currently working on a react-admin project where I need to establish a connection with an express server using a data provider. Despite my efforts, I have been unable to implement sorting and pagination functionality. It seems like modifications are requi ...

Is it possible to create a THREE.js form using a sequence of outlines?

Consider the scenario where three two-dimensional shapes are present. To keep things simple, let's envision them all as circles: Is there a method in THREE.js that allows for these shapes to be 'stacked' on top of each other vertically, res ...

React - Defining a global variable within a React component

Can you explain the process to me? I am trying to set up a variable within a react component class so that I can utilize it in multiple sections of my application. Here is what I have attempted: class ColorPick extends React.Component { colorInput; ...

Issue with Jquery Drag and Drop functionality, navigate to a different page

I am trying to incorporate a page with js from quotemedia.com using Jquery. When I insert the js into the sortable, and then drag and drop the element containing the js, it suddenly switches to full page display. This issue occurs in Firefox, but IE works ...

Leveraging the keyword 'this' within an object method in node's module.exports

My custom module: module.exports = { name: '', email: '', id: '', provider: '', logged_in: false, checkIfLoggedIn: function(req, res, next){ console.log(this); } }; I inclu ...

Can the mDNS string received through webRTC be decoded to retrieve a user's IP address?

After doing some thorough research, I came across this insightful response from a different Stack Overflow question. The problem at hand involves retrieving an mDNS string, which looks like this: abcd1234-1e1e-1e1e-1e1e-abcd1a2bc3de.local I have a genuin ...

Which is the better choice for me - webpack or create-react-app?

What's the best way to kickstart my react app - webpack or create-react-app? Are there any benefits to using webpack instead of create-react-app? ...

I wonder what the outcome would be if I used res.send to send a JSON file instead of res.json

Is it possible to send a JSON file using res.send in NodeJs instead of res.json? What are the potential consequences of doing this and why is it recommended to avoid this practice? ...

Struggling with displaying nested JSON data in React components

I have a nested JSON structure running on my local server, and I'm using React to practice displaying this nested data. Currently, I am focusing on showing the day and the available time slots for that day. I have managed to extract the "days" (mon, t ...