Skip to content

active: not working with Pressable's testOnly_pressed #240

@pvinis

Description

@pvinis

Describe the bug
active: doesnt work with testOnly_pressed. Specifically, if I have a Pressable with bg-green active:bg-red-500, when I tap that button, it will change color. But if I pass the testOnly_pressed prop to it, to simulate being pressed, then the color will not be the red one.
This makes it hard to have storybook for buttons.

Reproduction
https://github.com/pvinis/nativewind-pressable-active

Expected behavior

should be like

screenshot-2025-11-06-17 53 41@2x

but its like

screenshot-2025-11-06-17 53 32@2x

Additional context
Add any other context about the problem here. If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions