Skip to content
Snippets Groups Projects
Select Git revision
  • renovate/dompurify-3.x
  • renovate/modyfi-vite-plugin-yaml-1.x
  • renovate/vue-tsc-1.x
  • renovate/vitest-0.x
  • renovate/bootstrap-icons-1.x
  • renovate/vue-test-utils-2.x
  • renovate/vitest-ui-0.x
  • renovate/vitest-coverage-v8-0.x
  • renovate/showdown-2.x
  • renovate/node-23.x
  • feature/layout
  • feature/multiple-artists
  • main default protected
  • wvffle/improvements
  • relative-path-imports
  • add-histoire
  • provide-i18n
  • 19-move-from-fw-prefix-to-vui-prefix
  • 16-use-floating-ui-to-position-popovers
  • wvffle/vui
  • 0.4.1
  • 0.4.0
  • v0.3.0 protected
  • v0.2.2 protected
  • v0.2.1 protected
  • v0.2.0 protected
  • v0.1.3 protected
  • v0.1.2 protected
  • v0.1.1 protected
  • v0.1.0 protected
  • v0.1.0-rc1 protected
  • v0.0.4-rc2 protected
  • v0.0.3 protected
  • v0.0.2 protected
  • v0.0.1 protected
35 results

modal

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Ciarán Ainsworth authored
    Part-of: <!93>
    3e7a787d
    History
    Name Last commit Last update
    ..
    index.md

    Modal

    Prop Data type Required? Default Description
    title string Yes The modal title
    v-model true | false Yes Whether the modal is open or not

    Modal open

    <fw-modal v-model="open" title="My modal">
      Modal content
    </fw-modal>
    
    <fw-button @click="open = true">
      Open modal
    </fw-button>
    Modal content Open modal

    Modal actions

    Use the #actions slot to add actions to a modal. Actions typically take the form of buttons.

    <fw-modal v-model="open" title="My modal">
      Modal content
    
      <template #actions>
        <fw-button @click="open = false" color="secondary">
          Cancel
        </fw-button>
    
        <fw-button @click="open = false">
          Ok
        </fw-button>
      </template>
    </fw-modal>
    
    <fw-button @click="open = true">
      Open modal
    </fw-button>
    Modal content Cancel Ok Open modal

    Nested modals

    You can nest modals to allow users to open a modal from inside another modal. This can be useful when creating a multi-step workflow.

    <fw-modal v-model="open" title="My modal">
      <fw-modal v-model="openNested" title="My modal">
        Nested modal content
      </fw-modal>
    
      <fw-button @click="openNested = true">
        Open nested modal
      </fw-button>
    </fw-modal>
    
    <fw-button @click="open = true">
      Open modal
    </fw-button>
    Nested modal content Open nested modal Open modal

    Alert inside modal

    You can nest Funkwhale alerts to visually highlight content within the modal.

    <fw-modal v-model="open" title="My modal">
      Modal content
    
      <template #alert v-if="alertOpen">
        <fw-alert>
          Alert content
    
          <template #actions>
            <fw-button @click="alertOpen = false">Close alert</fw-button>
          </template>
        </fw-alert>
      </template>
    </fw-modal>
    
    <fw-button @click="open = true">
      Open modal
    </fw-button>
    Modal content Alert content Close alert Cancel Ok Open modal