Skip to content

Commit 7aa4b35

Browse files
committed
fix: #898 add Stepper with form doc
1 parent dc9dd5d commit 7aa4b35

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/routes/docs/components/stepper.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,39 @@ Use this example to show the number of steps inside a timeline component using i
224224
/>
225225
```
226226

227+
## Stepper with form
228+
Use this example to show the stepper component next to a form layout and change the content based on which currently step your are completing.
229+
230+
```svelte example
231+
<script lang="ts">
232+
import { ProgressStepper, Label, Input, Button } from "flowbite-svelte";
233+
</script>
234+
235+
<ProgressStepper steps={[{ status: "completed" }, { status: "current" }, { status: "pending" }]} classes={{ progressstepper: "mb-8" }} />
236+
<form action="#">
237+
<h3 class="mb-4 text-lg leading-none font-medium text-gray-900 dark:text-white">Invoice details</h3>
238+
<div class="mb-4 grid gap-4 sm:grid-cols-2">
239+
<div>
240+
<Label for="username" class="mb-2">Username</Label>
241+
<Input type="text" name="username" id="username" placeholder="username.example" required />
242+
</div>
243+
<div>
244+
<Label for="email" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">Email</Label>
245+
<Input type="email" name="email" id="email" placeholder="[email protected]" required />
246+
</div>
247+
<div>
248+
<Label for="password" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">Password</Label>
249+
<Input type="password" name="password" id="password" placeholder="•••••••••" required />
250+
</div>
251+
<div>
252+
<Label for="confirm-password" class="mb-2 block text-sm font-medium text-gray-900 dark:text-white">Confirm password</Label>
253+
<Input type="password" name="confirm-password" id="confirm-password" placeholder="•••••••••" required />
254+
</div>
255+
</div>
256+
<Button type="submit">Next Step: Payment Info</Button>
257+
</form>
258+
```
259+
227260
## Component data
228261

229262
The component has the following props, type, and default values. See [types page](/docs/pages/typescript) for type information.

0 commit comments

Comments
 (0)