Migrating from UISteps to HighRise Progress Steps
This guide will help you migrate from the ghl-ui Steps component to the new HighRise Progress Steps component.
Component Implementation Changes
Import Changes
diff
- import { UISteps, UIStep } from '@gohighlevel/ghl-ui'
+ import { HLProgressSteps } from '@platform-ui/highrise'
Breaking Changes
ARCHITECTURE CHANGES
The following architectural changes have been made:
Component Structure:
- Old: Used separate
UISteps
andUIStep
components - New: Single
HLProgressSteps
component with data-driven steps - Migration requires converting child components to array structure
- Old: Used separate
Status System:
- Old: Limited status options ('wait', 'error', 'finish', 'process')
- New: Enhanced status system ('complete', 'current', 'warning', 'error', default)
- More granular control over individual step status
Step Configuration:
- Old: Used slots for step content
- New: Uses structured step objects with title, subtitle, and status
PROP CHANGES
New Required Props:
id
: Required for accessibilitysteps
: Array of step objects
Changed Props:
current
→ Use status: 'current' in step objectdescription
→subtitle
in step objectstatus
→ Individual status per step
New Props:
vertical
: Boolean for vertical layout (unchanged)className
: Additional CSS classes- Step object properties:
renderIcon
: Custom icon functionpopoverProps
: Popover configurationcount
: Custom step number
Removed Props:
- Individual UIStep props (now part of step object)
Examples
Basic Steps
diff
- <UISteps :current="currentStep">
- <UIStep
- title="Create Account"
- description="Set up your account"
- />
- <UIStep
- title="Verify Email"
- description="Confirm your email address"
- />
- <UIStep
- title="Complete Profile"
- description="Add your personal information"
- />
- <UIStep
- title="Finish"
- description="Review and submit"
- />
- </UISteps>
+ <HLProgressSteps
+ id="onboarding-steps"
+ :steps="[
+ {
+ title: 'Create Account',
+ subtitle: 'Set up your account',
+ status: 'complete'
+ },
+ {
+ title: 'Verify Email',
+ subtitle: 'Confirm your email address',
+ status: 'complete'
+ },
+ {
+ title: 'Complete Profile',
+ subtitle: 'Add your personal information',
+ status: 'current'
+ },
+ {
+ title: 'Finish',
+ subtitle: 'Review and submit'
+ }
+ ]"
+ />
Interactive Steps
vue
<template>
<HLProgressSteps id="interactive-steps" :steps="steps" @update:step="handleStepClick" />
</template>
<script setup>
import { ref, computed } from 'vue'
import { HLProgressSteps } from '@platform-ui/highrise'
const currentStep = ref(1)
const steps = computed(() => [
{
title: 'Step 1',
subtitle: 'First step description',
status: currentStep.value > 0 ? 'complete' : 'current',
className: 'clickable-step',
},
{
title: 'Step 2',
subtitle: 'Second step description',
status: currentStep.value > 1 ? 'complete' : currentStep.value === 1 ? 'current' : 'default',
className: 'clickable-step',
},
{
title: 'Step 3',
subtitle: 'Third step description',
status: currentStep.value === 2 ? 'current' : 'default',
className: 'clickable-step',
},
])
const handleStepClick = index => {
currentStep.value = index
}
</script>
<style>
.clickable-step {
cursor: pointer;
}
.clickable-step:hover {
opacity: 0.9;
}
</style>
Vertical Steps with Icons
vue
<template>
<HLProgressSteps id="vertical-steps" :steps="steps" vertical />
</template>
<script setup>
import { HLProgressSteps } from '@platform-ui/highrise'
import { UserIcon, MailIcon, CheckIcon } from '@gohighlevel/ghl-icons/24/outline'
const steps = [
{
title: 'Account Created',
subtitle: 'Your account has been created successfully',
status: 'complete',
renderIcon: () => h(UserIcon),
},
{
title: 'Verification',
subtitle: 'Please verify your email',
status: 'warning',
renderIcon: () => h(MailIcon),
},
{
title: 'Completed',
subtitle: 'All steps are completed',
status: 'current',
renderIcon: () => h(CheckIcon),
},
]
</script>
Type Definitions
typescript
interface HLProgressStepProps {
id?: string
className?: string
count?: number
last?: boolean
popoverProps?: boolean | PopoverProps
renderIcon?: () => VNodeChild | undefined
subtitle?: string
status?: 'complete' | 'current' | 'warning' | 'error' | 'default'
vertical?: boolean
title: string
}
Best Practices
- Always provide unique
id
props for accessibility - Use clear and concise titles and subtitles
- Implement proper status management
- Consider using icons for visual clarity
- Use clickable steps when navigation is needed
- Keep step content concise
- Use vertical layout for complex steps
- Implement proper error handling
- Consider mobile responsiveness
- Follow accessibility guidelines
Additional Notes
- The component provides built-in responsive design
- Enhanced status visualization
- Support for custom icons
- Improved accessibility features
- Built-in click handling
- Consistent styling with HighRise
- Support for RTL layouts
- Better mobile support
- Popover support for additional content
- Integration with other HighRise components