Closed dax70 closed 1 year ago
In a similar vein to https://github.com/adobe/react-spectrum/issues/4377, I'll close this in favor of that issue.
@LFDanLu Thanks for the quick response. Sounds good. Same problem, and perhaps one that all ButtonBaseProps can define or allow for extension of custom attributes.
π Feature Request
It would be helpful to be able to be able to use props available on button such as
name
, andvalue
. Thetype
prop is already supported. That way the button values are included when the form is submitted.Alternatively, allow the spreading of arbitrary props into the component. That would enable wrapping the React-Aria-Components with new props supported in the underlying HTML element and or passed as RenderProps.
π€ Expected Behavior
Add the following:
π― Current Behavior
Button props are excluded from being rendered.
π Possible Solution
π¦ Context
Being able to use Toggle buttons as regular button and inputs able to capture state is helpful.
π» Examples
One example is a set of toggles to convert a UI from grid view to a list view, etc. Similar to how Finder in macOS enables the switching. Submitting the form to a server or in an SPA using the form data values to determine the user selection.
π§’ Your Company/Team
Considering using react-aria-components for products. React-Aria is a very impressive project and this would reduce a lot of boiler plate and reimplementing many of the patterns already in the examples.