Skip to content

Describe the use of container props #1076

Open

Description

@mrleblanc101

There is no explanation of what it does and how it work:
https://floating-vue.starpad.dev/api/#container

Image

v-tooltip v2 had container: false documented, but it's not documented anymore (#368)
https://floating-vue.starpad.dev/legacy/v2/#other-options

Image

Also, it would be nice to add an example or a mention of custom container like: container: '#myButton'

Activity

  1. mrleblanc101 commented on Apr 10, 2025

    @mrleblanc101
    ContributorAuthor

    In my case, I wanted the tooltip to be inside the element it's binded to, using container: false would put the tooltip inside the parent.

    <UButton
        id="emergencyStop"
        v-tooltip.bottom="{
            content:
                'Watch the antenna closely during the alignment. Use the emergency stop to prevent the antenna from colliding with an external object.',
            theme: 'danger',
            popperClass: 'max-w-[25rem] w-[25rem] text-base text-left font-normal',
            triggers: [],
            shown: true,
            container: '#emergencyStop',
        }"
    />

    Relates to #1075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions