Skip to content

Commit

Permalink
Merge pull request #51 from damianricobelli/damianricobelli-patch-1
Browse files Browse the repository at this point in the history
chore: update README.md
  • Loading branch information
damianricobelli authored Aug 20, 2024
2 parents 53d043a + 1577bfe commit 9457ec2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-cobras-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stepperize/react": patch
---

chore: update README.md
49 changes: 43 additions & 6 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,60 @@
# Stepperize for React

A React library for creating stepper components with a focus on accessibility and customization.
<p align="center">
<img src="https://stepperize.vercel.app/og.png" />
</p>

You can read the docs [here](https://stepperize.vercel.app).
A library for creating step-by-step workflows in your applications.

- 🚀 Fast
- 🔥 Powerful
- 📦 Lightweight, < 1kB (gzip)
- 🪄 Typesafe
- 🔗 Composable
- 🎨 Unstyled

## Installation

```bash
npm install @stepperize/react
npm i @stepperize/react
```

## Understanding the steps

The main idea is that we can define our IDs that will identify each step.
When we define the steps, we get an object that contains everything we need to build our stepper.

## Usage

Coming soon...
### Import the constructor

In order to create our steps we need to import the `defineSteps` from the library.

```tsx
import { defineStepper } from "@stepperize/react";
```

### Create the steps

`defineStepper` is a function that allows us to get a Provider, a hook and the array of steps we are using.
The only mandatory value for each step is the `id`. Then, we can add whatever we need and this will be typesafe when we use the hook.

```tsx
const { Scoped, useStepper, steps } = defineStepper(
{ id: "step-1", title: "Label 1", description: "Description 1" },
{ id: "step-2", title: "Label 2", description: "Description 2" },
{ id: "step-3", title: "Label 3", description: "Description 3" },
{ id: "step-4", title: "Label 4", description: "Description 4" }
);
```

### Next steps

Visit the [documentation](https://stepperize.vercel.app/docs/getting-started/use-stepper) to see more details.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## License

This project is licensed under the MIT License.
This project is licensed under the MIT License.

0 comments on commit 9457ec2

Please sign in to comment.