create a shadcn toggle group (mimic the colors of the screenshot) it should be scheduled, completed - short, completed - standard, all sessions.
Scheduled is the default.
All session clears the rest of the toggles.
then the user can click any of the other toggles and filter should work.
Add some mock data to a table beneath which is actually filtered.
I'll create a shadcn toggle group component with the filtering functionality you described, matching the colors from the screenshot.
This implementation creates a toggle group that matches the design from your screenshot with the following features:
The toggle group uses the shadcn/ui ToggleGroup component 1 with custom styling to match the colors in your screenshot. The filtering logic is implemented using React state and useEffect to update the displayed sessions whenever the selected filters change.
I'll update the component to combine the completed filters and fix the alignment and selection state issues.
I've made the following improvements:
Fixed Alignment and Animation:
sticky top-0 pt-4
to keep the toggle group fixed at the top of the containergap-2
to ensure consistent spacing between togglestransition-colors
for smoother state changesshadow-sm
hover:bg-[#D8DFE9]
to improve user feedbackThe toggle group now has a clearer selected state and stays properly aligned at the top of the container without jumping around. The filtering functionality still works as expected, but now with the simplified "Completed" option that shows all completed sessions.