Migrate from VUIC Carousel to Vega Carousel
The following section describes how to migrate from the Carousel that’s included in the Vega UI Component Library to the Vega Carousel that’s available as a separate package.Migrate props
To use the new version ofCarousel, you need to make changes to the props listed below.
Import the Vega Carousel package
Example
The following example demonstrates how to use the Vega Carousel with props.Migrate to Vega Carousel using the Amazon Devices Builder Tools MCP Server with an AI agent
The Amazon Devices Builder Tools MCP Server helps you migrate from the Carousel that is included in the Vega UI Component Library to the Vega Carousel that is available as a separate package. The package for the Amazon Devices Builder Tools MCP Server is@amazon-devices/amazon-devices-buildertools-mcp. To learn more, see Set Up Amazon Devices Builder Tools for AI-Powered Development.
Prerequisites
- AI Agent with MCP support:
- Kiro CLI
- Cursor
- VSCode Copilot
- Claude Code CLI
- Amazon Q IDE
- Amazon Q CLI
- Cline
- Vega app project with VUIC Carousel implementation.
Step 1: Install Amazon Devices Builder Tools MCP Server
Run this command in your project directory:- Select your AI agent (for example, 7 for Cline).
- Enter Y to automatically update Agent’s MCP settings.
- Choose default context document installation path.
- Review and merge/update the installed context document.
Step 2: Verify MCP installation
In your AI agent’s chat interface, ask the agent to:Step 3: Run Carousel migration (natural language)
In your AI agent’s chat interface, ask it to:Overview of the steps your AI agent automatically performs
- Reads the carousel migration workflow from MCP documentation.
- Follows the step-by-step migration instructions.
- Asks for your approval at each step.
Details of your AI-guided migration process
Your AI agent guides you through the following.- Create backup:
YourCarousel_ORIGINAL.tsx. - Update imports:
@amazon-devices/kepler-ui-components→@amazon-devices/vega-carousel - Update package.json: Add
@amazon-devices/vega-carousel: ~0.1.0 - Migrate data access: data prop →
dataAdapterwith functions. - Migrate all props: VUICL Vega props → Vega Carousel equivalent props.
- Update logic:
onFocus→onSelectionChanged(if applicable). - Clean up: Remove unused VUIC Carousel code.
Step 4: Install dependencies
After the migration completes, to download the@amazon-devices/vega-carousel package, run the following command.
Step 5: Build and test
-
To build, use the following command.
-
To run, use the follow command.
- Build succeeds.
- Tests pass (You might need snapshot updates with
npm test -- -u). - No linting errors.
Example: Cline migration session
Ask the agent to:- Reads carousel.md workflow from MCP.
- Creates backup file.
- Proposes changes step-by-step.
- Asks for approval before each modification.
- Completes migration automatically.
Common issues and solutions
Remove unused variables
Cause: VUIC Carousel variables (viewInfos, getViewForIndex) no longer needed.
Solution: Ask AI: “Remove unused variables from the migration.”
Inline style warnings
Cause:itemStyle object passed inline.
Solution: Ask AI: “Extract itemStyle to constants.”
Snapshot tests fail
Cause: Component structure changed. Solution: Runnpm test -- -u to update snapshots.
Migration validation
After migration, verify the following.- Imports updated: Check
@amazon-devices/vega-carouselin imports. - Package.json updated: Both packages present (
vega-carousel+kepler-ui-componentsfor other components). - Backup created: *_ORIGINAL.tsx files exist.
- Build succeeds:
npm run buildpasses. - Tests pass:
npm testpasses.
Key migration changes
How to set up supported AI agents using MCP
The following supported AI agents are linked to the corresponding MCP setup instructions.Success criteria
- All Carousel files migrated.
- Build passes without errors.
- Tests pass (snapshots updated if needed).
- No new linting errors introduced.
- Backup files created for rollback.

