Vant Sku is a Vue 3 component for displaying product SKU (Stock Keeping Unit) selection in e-commerce applications. Version 1.0.19 is the latest stable release. It is a migration from the Vant 2.x SKU component, providing similar functionality for Vue 3 environments. Key differentiators include support for custom stepper, slot-based customization, and extensive props for controlling stock, quota, and messages. It requires Vue 3 and is not compatible with Vue 2.
npm install vant-skuNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up VanSku component in a Vue 3 app with SKU data and event handlers.
Replace messageConfig prop with message-config following the new schema. Refer to vant 2.x docs for the old structure but adapt to Vue 3.
Ensure your project uses Vue 3. If on Vue 2, use the original vant 2.x version of sku.
Use 'stepper-title' prop as documented. No immediate action needed but prepare for removal.
Add the CSS import to your entry file.
Install and import Vant UI library, or ensure that the required components are available.
Run 'npm install vant-sku' and ensure import is 'import VanSku from 'vant-sku''.
Use 'app.use(VanSku)' for global registration, or include it in components option for local registration.
Ensure you pass a valid sku object to the :sku prop.