-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from damianricobelli/damianricobelli-patch-1
chore: update README.md
- Loading branch information
Showing
2 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@stepperize/react": patch | ||
--- | ||
|
||
chore: update README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |