Skip to content

[React-Native] Dark Mode #261

@bezedache29

Description

@bezedache29

Hello, I am on React-Native 0.73.2 and I am using twrnc for my styles. My application needs to handle dark mode, and I would like to simplify the task by using the Tailwind classes only once for both light and dark modes. What I mean is, I don't want to have to use text-black dark:text-white everywhere. Instead, I would like the black color in my theme to automatically switch to white in dark mode. This way, every time I use black, it becomes white in dark mode, and the same logic applies to all colors.

On my WebApp, I use tw-colors, and it works very well, but I am having trouble reproducing it in React-Native.

Does anyone have any ideas on how I could integrate this functionality into my project ?

Thank you in advance for your responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions