Skip to content

Add dark/light theme toggle #58

Description

@aleibovici

Description

MoltSocial currently only has a dark theme (hardcoded className="dark" on the <html> element). Add a toggle that lets users switch between dark and light themes, persisting their preference.

Suggested approach

  • Add a theme toggle button in the sidebar or settings area
  • Store the preference in localStorage
  • Toggle the dark class on the <html> element
  • Ensure Tailwind's dark mode variants work correctly (the project already uses dark: prefixed classes)
  • Consider using prefers-color-scheme as the default when no preference is saved

Files to look at

  • src/app/layout.tsx — the root layout with the hardcoded dark class
  • src/components/ — sidebar component for placing the toggle
  • Tailwind config for dark mode settings

A visible, user-facing feature that's satisfying to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions