Vue playground

Nova v3.37.0

Preview

Vue

nv-icon migration

Moving from the size flags to size, now that color is gone.

← nv-icon

Migration Guide for nv-icon

In the latest version of the nv-icon 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 icons from version 2 to version 3.

Deprecations

1. prop large, medium, small, xSmall, xLarge -> size

The size properties have been consolidated into a single size property with an enum type.

Old Usage:

html<nv-icon name="user" large></nv-icon>
<nv-icon name="user" medium></nv-icon>
<nv-icon name="user" small></nv-icon>
<nv-icon name="user" xLarge></nv-icon>
<nv-icon name="user" xSmall></nv-icon>

New Usage:

html<nv-icon name="user" size="lg"></nv-icon>
<nv-icon name="user" size="md"></nv-icon>
<nv-icon name="user" size="sm"></nv-icon>
<nv-icon name="user" size="xl"></nv-icon>
<nv-icon name="user" size="xs"></nv-icon>

Breaking Changes

1. prop color has been removed

The color prop has been deprecated in favor of using CSS classes for color styling. This change aims to provide more flexibility and consistency with standard styling practices.

Old Usage:

html<nv-icon name="user" color="success"></nv-icon>

New Usage:

html<nv-icon name="user" class="text-green-500"></nv-icon>