Home > @uniformdev/design-system > isNativeButtonTrigger
isNativeButtonTrigger() function
Determines if the given trigger element will render a real <button> element to the DOM, so that Base UI's nativeButton prop can be set correctly.
Detection strategy (any one of): 1. Plain <button> JSX (element.type === 'button') or a <button css={...} /> is still detected. We also fall back to checking element.props.type === 'button' for the original type="button" attribute Emotion preserves.
Anything else (including non-element children, plain <div>, etc.) falls back to false so Base UI's keyboard polyfill keeps firing.
Signature:
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
element |
React$1.ReactNode |
Returns:
boolean