Comments (4)
I think it's preferable to use the pressed:
variant from the plugin in place of tailwind's default active:
variant. You'll get more consistent behavior across input modalities, and this should also fix your issue due to how they're ordered in the plugin. I think the behavior you're seeing is expected, since :active
and [data-hovered]
have the same specificity, it comes down to which comes last in the stylesheet, which would be [data-hovered]
since it comes from the plugin.
from react-spectrum.
I understand the benefits that pressed
offers, however, the issue is that the plugin is disrupting the expected behavior, i.e., adding the plugin shouldn’t change existing behavior. In this case, the native hover state is being used because <button>
doesn’t have a programmatic isHovered
state. It seems like the native :hover
selector’s precedence is modified by the plugin, so it only makes sense that the :active
selector’s precedence is modified accordingly, even though the selector is discouraged, to maintain consistent behavior.
The specific use case where I want to keep using the :active
state is with links because the link components and press removes the native drag and drop ability.
from react-spectrum.
The only potential solution I can think of is specifying a custom variant order in the plugin.
from react-spectrum.
Prefixing all React Aria Components modifiers can resolve this issue.
from react-spectrum.
Related Issues (20)
- Docs are not clear about where to set props when using a custom ModalOverlay with Modal HOT 5
- Setting "display:none" on ListView parent crashes the page
- useMove/ColorArea/ColorSlider: Implement autoscrolling on move
- RSP does not install on windows
- User Search ComboBox, long text causes popup to immediately close when clicked HOT 2
- `Button`s inside a `GridListItem` are not disabled when the item is disabled
- Pin dependency versions on release HOT 3
- ComboBox with name property - warnings in console.
- Allow customizing react-spectrum DropZone's padding and border HOT 2
- useOverlayPosition regression for non-viewport boundary/container HOT 1
- Different popover underlay behaviors between mobile and desktop devices HOT 2
- Enter and Space should activate long presses HOT 1
- [Slider] Custom validation for multiple thumb values
- DatePicker and DateRangePicker onChange parameter type should include null. HOT 1
- Locale should probably be set from the system's Locale, not browser langauge HOT 5
- eslint-plugin-jsdoc dependency version forces node version <=19 HOT 2
- `useHref` passed to `RouterProvider` not respected for synthetic links
- Input in HiddenSelect component is not hidden from AutoFill, so it gets the value autofilled instead of the Select field below it
- RAC ListBox preview bug on safari when using a combination of position relative and absolute HOT 1
- Source maps not included for `@react-aria` packages HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-spectrum.