Skip to content

feature: Add Progress Bar to Toasts #102

@sahilatahar

Description

@sahilatahar

Enhance the react-fox-toast by adding a progress bar that visually indicates the duration before the toast disappears. This will improve user experience by giving a clear indication of how long the toast will remain visible.

Feature Requirements:

  • Add a progress bar that fills up based on the toast's lifespan.
  • Allow customization of progress bar styles (e.g., color, thickness, position).
  • Ensure compatibility with different toast types (success, error, warning, etc.).
  • Provide an option to disable the progress bar if not needed.
  • Ensure smooth animations and performance optimization.

Possible Implementation:

  • Use CSS animations or JavaScript-based timing to animate the progress bar.
  • Allow configuration via props (e.g., showProgress: boolean, progressColor: string).
  • Consider positioning the progress bar on top, bottom, or inside the toast.

References:

  • Look at similar libraries like react-toastify for implementation ideas.

Priority: Medium
Labels: Enhancement, UI/UX

Would you like me to draft a PR template for this issue? 🚀

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions