Remove @headlessui/react Transition in Favor of Pure CSS #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the dependency on
@headlessui/react
for transition effects and replaces its usage with a simpler, Tailwind-based CSS approach. This helps streamline the stack and aligns the project more closely with the existing usage of shadcn/ui and Tailwind utility classes.Changes
Replaced the Transition component from
@headlessui/react
in theProfile
andPassword
page component success message with a Tailwind CSS opacity transition.Updated conditional rendering logic to animate the "Saved" message using native CSS transitions (
transition-opacity, opacity-0, opacity-100
).Removed unnecessary dependency on @headlessui/react where it was only used for this purpose.
Motivation
Maintain consistency with
shadcn/ui
, which is already used throughout the project.Reduce bundle size by eliminating unused dependencies.
Simplify component logic by leveraging Tailwind’s built-in transition utilities.
Avoid importing a full animation library for minor UI feedback.
Impact
No functional change in user experience: the "Saved" message still fades in/out on successful form update.
Cleaner and more maintainable codebase.
@headlessui/react
may now be removed from the project entirely.Testing
Verified that the "Saved" message correctly appears and fades in/out when profile data is saved.
No visual regressions or console warnings observed during manual testing.
Before & After
Before:
After: