diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index ac41eb1..1a5163f 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -80,7 +80,8 @@ export const CATEGORIES = [ 'Flowing Menu', 'Elastic Slider', 'Stack', - 'Chroma Grid' + 'Chroma Grid', + 'Stepper' ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d543dc2..596c6c4 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -69,6 +69,7 @@ const components = { 'tilted-card': () => import('../demo/Components/TiltedCardDemo.vue'), 'stack': () => import('../demo/Components/StackDemo.vue'), 'chroma-grid': () => import('../demo/Components/ChromaGridDemo.vue'), + 'stepper': () => import('../demo/Components/StepperDemo.vue'), }; const backgrounds = { diff --git a/src/constants/code/Components/stepperCode.ts b/src/constants/code/Components/stepperCode.ts new file mode 100644 index 0000000..218495e --- /dev/null +++ b/src/constants/code/Components/stepperCode.ts @@ -0,0 +1,59 @@ +import code from '@content/Components/Stepper/Stepper.vue?raw'; +import { createCodeObject } from '@/types/code'; + +export const stepper = createCodeObject(code, 'Components/Stepper', { + installation: `npm install motion-v`, + usage: ` + + + Welcome to the Vue Bits stepper! + Check out the next step! + + + + Step 2 + + Custom step content! + + + + How about an input? + + + + + Final Step + You made it! + + + + +` +}); diff --git a/src/content/Components/Stepper/Stepper.vue b/src/content/Components/Stepper/Stepper.vue new file mode 100644 index 0000000..4d7f02d --- /dev/null +++ b/src/content/Components/Stepper/Stepper.vue @@ -0,0 +1,275 @@ + + + + + + handleStepClick(index + 1)" + :class="[ + 'relative outline-none flex h-8 w-8 items-center justify-center rounded-full font-semibold', + isCompleted ? 'cursor-default' : 'cursor-pointer' + ]" + :style="getStepIndicatorStyle(index + 1)" + > + + + + + {{ index + 1 }} + + + + + + + + + + + + + + + + + + + + + + + + {{ backButtonText }} + + + {{ isLastStep ? 'Complete' : nextButtonText }} + + + + + + + + diff --git a/src/demo/Components/StepperDemo.vue b/src/demo/Components/StepperDemo.vue new file mode 100644 index 0000000..358fa12 --- /dev/null +++ b/src/demo/Components/StepperDemo.vue @@ -0,0 +1,192 @@ + + + + + + + + Welcome to the Vue Bits stepper! + Check out the next step! + + + + Step 2 + + Custom step content! + + + + How about an input? + + + + + Final Step + You made it! + + + + + + + + + + + + + + + + + + +
Check out the next step!
Custom step content!
You made it!