FormidableLabs / FormidableLabs/spectacle
Provide a way to add custom stepper components
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 700
- PR merge metrics
- No merged PRs in 30d
Description
### Description
It looks like Spectacle supports two steppers only: Appear and Stepper.
There are cases when none of the above is a good fit.
For instance: integrating https://github.com/pomber/code-surfer, or drawing a plot where step elements result in adding more data or adding lines to the plot.
### Proposal
What if there was a way to declare a number of steps explicitly or with a hook?
For instance:
```
// This configures the slide to have 5 steps, and the current step could be requested as usual context
```
Alternative option: provide a hook that would enable a component to declare the number of underlying steps.
For instance, in the cases like `code-surfer`, the number of steps is defined by the markup, and it would be error-prone (and inconvenient) to specify the number of steps twice (in code-surfer markup and in ``.
### Links / References
https://github.com/jxnblk/mdx-deck/blob/0cca3a082414ca4b186ae1e7ecbda8ab00ab11bf/docs/api.md#usesteps
Contributor guide
Assessment
This issue has not been assessed yet.