Vue playground

Nova v3.37.0

Preview

Vue

nv-dialog migration

Moving modalTitle into the dialog header and dropping iconColor.

← nv-dialog

Migration Guide for nv-dialog

In the latest version of the nv-dialog component, we've made several important changes to the properties to improve usability and consistency. Below is a guide to help you update your existing components from version 2 to version 3.

We’ve renamed the component from nv-modal to nv-dialog. This change reflects that “modal” refers to a behavior (a way of displaying content) rather than the component itself. The term “dialog” better represents the purpose and function of this component.

Deprecations

1. prop modalTitle -> title inside the nv-dialogHeader

The modalTitle property has been renamed to title inside the nv-dialogheader. This new name better describes the property's functionality, which allows the dialog to be opened or closed. Decomposing the component into smaller components makes it easier to understand and use.

Old Usage:

html<nv-modal modaltitle="Modal"> </nv-modal>

New Usage:

html<nv-dialog>
  <nv-dialog-header title="Modal"></nv-dialog-header>
</nv-dialog>

Breaking Changes

1. prop iconColor -> removed

The iconColor property has been removed. DialogHeaders do no longer have a default icon. Icons can be added be replacing the header with a custom slot.

New Usage:

html<nv-dialog>
    <nv-button slot="trigger">Dialog Warning</nv-button>
    <div slot="header" class="flex items-center">
        <nv-icon name="bulb"></nv-icon>
        <h4>Title</h4>
    </div>
    <p>
        This is a dialog with a custom header containing an icon and a title
    </p>
</nv-dialog>