Skip to content

Add ability to provide an anchor for the popover #4013

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
innocenzi opened this issue Apr 28, 2025 · 0 comments
Open

Add ability to provide an anchor for the popover #4013

innocenzi opened this issue Apr 28, 2025 · 0 comments
Labels
enhancement New feature or request triage v3 #1289

Comments

@innocenzi
Copy link

Description

The popover uses the content of the default slot to create a trigger, but there is no way to provide a custom anchor. A <template #anchor> slot for this purpose would be great.

<UFormField label="name" name="name">
  <UPopover :open="isAutoCompleteOpen">
    <template #anchor>
      <UInput v-model="state.name" />
    </template>
    <template #content>
      <Placeholder class="size-48 m-4 inline-flex" />
    </template>
  </UPopover>
</UFormField>

My use case is building an autocomplete for a text input. The InputMenu is not suitable because the dropdown is too intrusive.

Additional context

No response

@innocenzi innocenzi added enhancement New feature or request triage v3 #1289 labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant