Vuetify - Reordering items to the bottom of the list

Hey there! I have a quick question about Vuetify. I'm looking to move the social media icons to the bottom of my navigation drawer, but I'm having some trouble figuring it out. Can anyone offer some guidance on how to achieve this using Vuetify classes/props without relying too heavily on CSS? The code I'm working with is listed below and is wrapped inside a v-navigation-drawer> tag.

Thank you in advance for your help!

https://i.sstatic.net/Qv2HY.png

<template>
  <v-list>
    <v-list-item two-line>
      <v-list-item-content class="pb-5 text-center">
        <v-list-item-title class="orange--text display-2">{{
          username
        }}</v-list-item-title>
        <v-list-item-subtitle class="text-h6 font-weight-light white--text">{{
          expertOf
        }}</v-list-item-subtitle>
      </v-list-item-content>
    </v-list-item>
    <NuxtLink
      v-for="(component, index) in components.filter(
        (component) => component.name != 'Name'
      )"
      :key="index"
      :to="path === '/' ? `#${component.name}` : '/'"
    >
      <v-list-item>
        <v-list-item-content>
          <v-list-item-title
            ><v-btn
              block
              depressed
              class="text-capitalize font-weight-light grey darken-4"
              >{{ component.name }}</v-btn
            ></v-list-item-title
          >
        </v-list-item-content>
      </v-list-item>
    </NuxtLink>
    <NuxtLink to="/blog">
      <v-list-item>
        <v-list-item-content>
          <v-list-item-title
            ><v-btn
              block
              depressed
              class="text-capitalize font-weight-light grey darken-4"
              >Blog</v-btn
            ></v-list-item-title
          >
        </v-list-item-content>
      </v-list-item>
    </NuxtLink>

    <v-list-item class="mb-2">
      <v-list-item-content>
        <SocialMedia />
      </v-list-item-content>
    </v-list-item>
  </v-list>
</template>


Answer №1

Successfully obtained exactly what was required:

https://i.sstatic.net/GLzLs.png

No CSS was utilized, but a helper div had to be added for grouping purposes.

Displayed code snippet:

<template>
  <v-list class="d-flex flex-column justify-space-between fill-height">
    <div>
      <v-list-item two-line>
        <v-list-item-content class="pb-5 text-center">
          <v-list-item-title class="orange--text display-2">{{
            username
          }}</v-list-item-title>
          <v-list-item-subtitle class="text-h6 font-weight-light white--text">{{
            expertOf
          }}</v-list-item-subtitle>
        </v-list-item-content>
      </v-list-item>
      <NuxtLink
        v-for="(component, index) in components.filter(
          (component) => component.name != 'Name'
        )"
        :key="index"
        :to="{ path: '/', hash: '#' + component.name }"
      >
        <v-list-item>
          <v-list-item-content>
            <v-list-item-title
              ><v-btn
                block
                depressed
                class="text-capitalize font-weight-light grey darken-4"
                >{{ component.name }}</v-btn
              ></v-list-item-title
            >
          </v-list-item-content>
        </v-list-item>
      </NuxtLink>
      <NuxtLink to="/blog">
        <v-list-item>
          <v-list-item-content>
            <v-list-item-title
              ><v-btn
                block
                depressed
                class="text-capitalize font-weight-light grey darken-4"
                >Blog</v-btn
              ></v-list-item-title
            >
          </v-list-item-content>
        </v-list-item>
      </NuxtLink>
    </div>
    <v-list-item>
      <v-list-item-content class="mt-auto">
        <SocialMedia />
      </v-list-item-content>
    </v-list-item>
  </v-list>
</template>

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

Image gradually disappears after being loaded via ajax request

I am trying to achieve a fade-in effect for images after they have been loaded following an ajax call. The goal is to make the fade-in occur smoothly, rather than having the user observe the image loading process. Is there anyone who can assist me with ...

Leverage the power of require() beyond the confines of Node

I'm currently exploring how to integrate an Angular.js application with Node.js. At the moment, I have the following code in the file MY-PROJECT/public/js/controllers.js function LoginController( $scope ) { // fetch waiters var Waiter = require( ...

Making a full-width browser bar by utilizing negative margins

I've been following a tutorial and need help with my header element. I want it to have a max-width of 800px and be centered in the middle of the page. Inside the header, there will be a #filtersBar div that spans the entire width of the page. Here&apo ...

MUI options - The specified type 'string' cannot be matched with type '"icon" | "iconOnly" | "text" | "outlined" | "contained" | undefined'

Is it possible to utilize custom variants in MUI v5? I am having trouble using a custom variant according to their documentation: https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants declare module "@mui/material ...

Fixing "local storage not defined" issue in vue.js

While attempting to run test cases in vue.js, I encountered an error stating that local storage is not defined. Can anyone provide guidance on resolving this issue? [Login.spec.js] import Login from '../../src/Pages/Login.vue'; import{shallowMo ...

Implementing theme in Monaco editor without initializing an instance

I recently developed a web application incorporating Monaco Editor. To enhance user experience, I also integrated Monaco for syntax highlighting in static code blocks. Following guidance from this source, I successfully implemented syntax highlighting wit ...

What is the best way to combine values passed from PHP to AJAX?

I need to combine the contents of showFname, showMname, and showLname and display the result in showName. However, I am facing an issue where the combined names are not appearing in showName. HTML <input type="text" id="showFname" name="showFname" /& ...

Ways to retrieve a returned value from mongoose

I am attempting to retrieve a value from a mongoose callback function, but I keep encountering an error stating TypeError: #<Object> is not a function. I understand that it may be tricky to achieve this, but the way I am querying the database require ...

Encountering the error message in Node.js: TypeError - 'callback' is not recognized as

I'm currently struggling with passing the object result back to the function. Despite my attempts at using a callback, it doesn't seem to be working. I'm unsure of where the issue lies. Has anyone had success in passing a variable from a chi ...

The data type "100%" cannot be assigned to a number type in the kendo-grid-column

I need the columns in the grid to have a width of 100%. <kendo-grid-column field="id" title="id" [width]="'100%'"> </kendo-grid-column> However, when I hover over the code, I get this message: The value "100%" cannot be ...

Is it possible to control the functionality of the back button?

Is there a way to customize the behavior of the back button in a browser? For instance, instead of navigating back to the previous page (A.aspx) when a user is on B.aspx, can we make it go to Home.aspx? Is it possible to achieve this using ASP, C#, JavaSc ...

Node.js/Express API Endpoint Ceases Functioning

In my Angular/Express.js app, there is a post method within my api.service.ts file: post(data: any, endpointUrl: string): Observable<T> { console.log("REACHED POST METHOD") return this.http.post<T>(`${this.apiUrl}/${endpoint ...

JQuery struggling to attach blur event to every single <input> element on a webpage

I'm attempting to attach a blur event to all "input" elements on the page, including those nested inside iframes. While I've successfully attached blur events to input elements outside of iframes, I'm facing challenges with elements within ...

Utilize CSS to ensure that the hover effect of the main navigation remains active even when the mouse hovers over the sub-menu

Is there a way to make the hover state in navigation items persist when the mouse hovers over a sub-menu? Currently, when hovering over a top-level nav item, the link color changes to white and background turns black, but this reverts back once the mouse m ...

Exploring the functionality of && in a React element

I am puzzled by this functional component in react that I am trying to comprehend. The Post component takes two parameters, post and excerpt, with the use of 2 ternary operators. Below is the rendering code from a component utilizing post. const r ...

Verify that a Checkbox has been selected

I'm attempting to determine if a checkbox has been checked, and if it has, adjust the visibility of a specific DIV element. Unfortunately, my check is not working as expected. Despite placing an alert before the "if" statement and confirming that it ...

How is it possible that I am receiving two different outputs, with one of them even being undefined

I created a button using Jquery to submit POST data. It sends the value "name" : "kevin" in JSON format. $(document).ready(function() { $('#clickMe').on('click', function() { var data = {}; data.name="kevin"; ...

Struggling with using the $.get method in JavaScript

As a JavaScript beginner, I've encountered an odd issue while working on a weather application. I initially managed to fetch weather data from this source using latitude and longitude values. However, after making some code modifications for additiona ...

Exploring the angular $http module

How can one successfully access the $http object in angular.js? function MyController($scope) { $http... // not defined } ...

Creating a responsive div with inner content is a simple task that can be accomplished without relying

I am looking to create a responsive div along with its inner content, so that the div adjusts in size as I resize the window without relying on bootstrap. An example of what I'm trying to achieve is shown below: <div id="mapImage1" class= ...