Skip to content

feat(Overlay): stick-to-target prop #21704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Jul 6, 2025

Description

  • introduces new prop stick-to-target

resolves #19856
resolves #19732
resolves #17125

Markup:

<template>
  <v-app theme="dark">
    <v-container class="d-flex justify-center align-center h-100">
      <v-sheet class="overflow-scroll" max-height="400" max-width="600">
        <!-- <div v-for="i in 60">Lorem ipsum dolor sit</div> -->
        <div class="d-flex ga-5">
          <v-btn color="green">
            Stick to target
            <v-menu activator="parent" attach stick-to-target>
              <v-list :items="items" border />
            </v-menu>
          </v-btn>
          <v-spacer />
          <v-btn color="red">
            Keep visible (default)
            <v-menu activator="parent" attach>
              <v-list :items="items" border />
            </v-menu>
          </v-btn>
        </div>
        <div class="d-flex ga-5 text-no-wrap">
          <div v-for="i in 20" :key="i">Lorem ipsum dolor sit</div>
        </div>
        <div v-for="i in 60" :key="i">Lorem ipsum dolor sit</div>
      </v-sheet>
    </v-container>
  </v-app>
</template>

<script>
  export default {
    data: () => ({
      items: Array.from({ length: 5 }, (_, i) => `Item #${i + 1}`),
    }),
  }
</script>

@J-Sek
Copy link
Contributor Author

J-Sek commented Jul 9, 2025

The more I click stuff in docs, the more I feel like it should be a default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay T: enhancement Functionality that enhances existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.6.7] Behavior of VMenu / Vselect position when scrolling on the page [Bug Report][3.6.0] VSelect menu shifted few pixels to the right
2 participants