How come my v-speed-dial does not cover up other elements on my Vue website?

I have encountered an issue on a page with multiple components. One of the components contains a <v-speed-dial> with a fab button. The problem is that when I open the speed dial, it gets placed below the component immediately below it.

To give you a better idea, here is a screenshot: https://i.sstatic.net/xJM8x.png

Below is the code snippet:

<template>
<v-card outlined>

    <v-card-title>Selection</v-card-title>

    <v-toolbar height="80" elevation="0">
        <v-speed-dial class="mb-5" direction="bottom">

            <template v-slot:activator>
                <v-btn text fab>
                    <v-icon :color="myIcon.color" x-large>{{ myIcon.name }}</v-icon>
                </v-btn>
            </template>

            <v-btn fab small color="green">
                <v-icon color="white" x-large @click="changeStatusToUp()">mdi-chevron-up</v-icon>
            </v-btn>

            <v-btn fab small color="grey">
                <v-icon color="white" x-large @click="changeStatusToMid()">mdi-unfold-less-vertical</v-icon>
            </v-btn>

            <v-btn fab small color="red">
                <v-icon color="white" x-large @click="changeStatusToDown()">mdi-chevron-down</v-icon>
            </v-btn>

        </v-speed-dial>

    </v-toolbar>

</v-card>

If needed, here is the JavaScript code:

<script>

export default {
    name: "Selection",
    data() {
        return {

            myIcon: {
                name: 'mdi-unfold-less-vertical',
                color: 'grey'
            },
            colors: {
                red: 'red',
                green: 'green',
                grey: 'grey'
            }
        }
    },
    props: {},
    computed: {},
    methods: {

        changeStatusToUp() {
            this.myIcon.name = 'mdi-chevron-up'
            this.myIcon.color = 'green'
        }
        ,
        changeStatusToDown() {
            this.myIcon.name = 'mdi-chevron-down'
            this.myIcon.color = 'red'
        }
        ,
        changeStatusToMid() {
            this.myIcon.name = 'mdi-unfold-less-vertical'
            this.myIcon.color = 'grey'
        }
    }
};

Although everything works correctly and the speed dial opens in different directions as expected, it still remains hidden under the component located beneath it. Any assistance in resolving this issue would be greatly appreciated!

Answer №1

It appears that the issue lies in the placement of your speed dial within a v-toolbar.

A toolbar is typically used for creating navigation headers at the top of an application.

In contrast, speed dials are floating buttons commonly located at the bottom of an app.

To resolve this problem, simply remove the v-toolbar from your setup.

UPDATE: The Vuetify documentation offers two distinct examples available here:

  • The first demonstrates v-btn enclosed within v-toolbar
  • While the second showcases the usage of v-speed-dial

It seems like you may have mixed up these two scenarios. I recommend reviewing the provided examples in the documentation to ensure proper implementation based on your needs.

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

Enhancing React Functionality: Increasing React State Following an If Statement

Whenever I click on the start/stop button, it triggers the handlePlay function. This function then proceeds to initiate the playBeat function. In an ideal scenario, the play beat function should continuously display 1222122212221222... until I press the st ...

Organizing a set of div elements based on their ID attributes

I am faced with the challenge of sorting a list of divs based on their ID values, which are in the format "indexNumber123". Instead of arranging them alphabetically, I want to sort them numerically as "indexNumber1", "indexNumber2", "indexNumber3" before d ...

Change WordPress links to parent page without altering the current URL

Having trouble with redirect rules for a single-page app within a sub-page of a Wordpress site. Despite following the provided instructions closely, issues persist. The subpages in question are custom post types for various business locations. Upon visitin ...

Using a loop to incorporate numerous objects in three.js - inserting both .obj and .mtl files in bulk

I've encountered an issue in my code where I'm unable to locate the mistake(s)... The problem lies within a loop that loads multiple objects and assigns them names, but the "objects" array remains empty as a result. My goal is to give each object ...

I am attempting to load the ajax content into separate divs simultaneously

When I attempt to load the ajax into two separate divs, I notice that despite calling for data to be placed in two different divs within the ajax code, it all ends up in one div. <script>$(document).ready(function(){ $.ajax({ url: "http: ...

After six attempts, Fetch POST does not successfully submit data

I've set up event listeners in my code that are supposed to trigger a POST fetch command to a NodeJS script, which then writes the content to a file. The code is functioning correctly, but it stalls after 6 calls. To continue, I have to manually stop ...

Checkbox radio buttons with mandatory selection

I'm facing a challenge with radio buttons in my form. While checkboxes could easily solve this issue, the customer specifically requested radio buttons. Here is the relevant section of the form: <label> <span>I Agree*</span> ...

showcasing a set of div elements by using forward and backward buttons

I am dealing with 5 divs that have text content inside. To navigate through each div, I have implemented a back and next button system. <a href="" class="back-btn off">Back</a> | <a href="" class="next-btn">Next</a> <div class ...

Error encountered: GL_INVALID_OPERATION in three.js while executing glDrawArrays: trying to access vertices outside the valid range in attribute 1

I've been struggling with this issue for quite some time now. I am in the process of creating a game, and the main map is a model in obj format. I load it using the following code snippet: var objLoader = new THREE.OBJLoader(); objLoader.setPath(&apos ...

What are the methods for distributing a variable in AutoHotkey?

When working in JavaScript, we often utilize the spread operator to spread an array of items, like so: const arr = [1, 2, 3] console.log(...arr) // 1 2 3 Now, in AHK, I am trying to achieve a similar effect: Position := [A_ScreenWidth / 2, A_ScreenHeight ...

Tips for consuming a JSON object and generating two arrays in JavaScript

Is there a way to create two arrays from a JSON input, with one array containing only keys and the other containing only values, while excluding pairs where the key is numerically equal to the value? ...

The value of Vue's v-model data is currently undefined, likely due to an

When working with Vue 2, I encountered a scenario where I had data coming in from an ajax call. Here is the code snippet that exemplifies this: <template> <div> <input type="input" class="form-control" v-model="siteInfo.siteId"& ...

Struggling to pass a function argument as a string for use within the function

Although the title may seem unclear, I will clarify. I have a collection of images on the left side and I have implemented an onclick function on each one to display the image and some information on the right side. It's like having thumbnails on the ...

Focus loss occurs when the state changes in a Custom Tooltip containing an MUI TextField

Currently, I am utilizing MUI and have implemented a custom Tooltip for one specific TextField within my form. The issue arises when I start typing in this particular TextField as it loses focus immediately. Consequently, the state of the value in my formD ...

Tips for successfully sending data to an ng-include controller

So, I've got this ng-include html element, and I'm trying to figure out how to pass data from an external source to the controller. The primary controller is responsible for fetching json data from a http webservice, and then parsing that data i ...

What is a universal method to express "not yet interacted with" in Vue?

When I have an input field, I want to check the content before submitting it. Depending on whether the input is correct or incorrect, I apply a specific class for user feedback: new Vue({ el: "#app", data: { input: "" }, methods: { getCl ...

What is the reason for requiring this to be passed as an Array instead of a String?

I'm currently learning node.js through a tutorial in a book titled Node Web Developments. Issue: I am struggling with understanding why an array [] is being passed as the 3rd argument from mult-node.js to the required function htutil.page(), instead ...

Show the .dae file on screen and generate a jpg texture from the path specified in the dae file

I have a collection of kmz files and I'm looking to extract the dae files from them in order to showcase them individually using three.js. I've discovered that these dae skin renderings are actually jpg files, with their paths specified within t ...

What is the best way to include arrays in VueJS?

Currently, I am working with two arrays in my Vue application. The first array called desserts lists all the desserts that I have. The second array, moreDesserts, displays checkboxes with values. When a user selects a checkbox, the value is added to the se ...

Issue encountered while attempting to install Parcel, with errors being triggered in the parcelwatcher and in the process of

1 npm ERR! path C:\Users\USER\OneDrive\Documents\My sites\Music Website\node_modules@parcel\watcher npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ER ...