About this prerelease
6.0.0-alpha.1 is the first 6.x prerelease since 6.0.0-alpha.0 in June: 41 commits from main, 11 of them breaking. It's for trying 6.x in real apps and finding what breaks before 6.0.0-beta.0. APIs can still change until beta.
npm install react-native-paper@alphaComing from 5.x or from alpha.0? Start with the [6.x migration guide](https://github.com/callstack/react-native-paper/blob/main/docs/6.x/docs/guides/migration.md). The breaking changes it doesn't cover yet are marked below. Please report problems as issues and mention 6.0.0-alpha.1.
Breaking changes since alpha.0
- Accessibility props (#5005):
accessibilityLabel,accessibilityRole,accessibilityStateand related props becomearia-label,role,aria-disabled,aria-checked,aria-selectedand related props. The keys inside data objects change too: BottomNavigationroutes[], SegmentedButtonsbuttons[]and FAB.Menu items take'aria-label'. Not in the migration guide yet. - Modal and Dialog render through their own Portal (#5126): remove any
Portalwrapper; aPaperProviderorPortal.Hostmust be above them, or they throw. While a modal is open, the app behind it is hidden from assistive technology and from test queries. Partly in the migration guide. - Modal accessibility (#5125):
overlayAccessibilityLabelbecomesdismissAccessibilityLabel; Modal and Dialog content have the dialog role and takearia-label;dismissableBackButtonalone controls dismissal with the Android back button. - Reanimated styles (#5015): style props take styles from
useAnimatedStyle; React NativeAnimatedvalues are no longer accepted.elevationtakes a level from 0 to 5 and animates changes itself. Appbar takes static styles and anelevatedprop. - Surface (#5078): background color and corner radius move to the
backgroundColor,borderRadiusandborder*Radiusprops;overflow: hiddenand thepointerEventsprop are no longer supported.styleno longer overrides the background or radius of Banner, Button, Card, Chip, Dialog, MenucontentStyle, Searchbar and Snackbar: use their color props or the theme. - testIDs (#5088, #5099): components no longer set default testIDs or derive internal ones from yours. Pass
testIDexplicitly; new props such asiconTestID,trailingTestIDandoverlayTestIDreplace the derived IDs. - No more props injected into children (#5076): Card pads its content itself; set
modeandcompacton each Button inside Card.Actions and Dialog.Actions; List.Accordion indents only List.Item children. - Searchbar (#5117): the
traileringIcon*props are renamed totrailingIcon,trailingIconColor,trailingIconAccessibilityLabelandonTrailingIconPress. - ToggleButton removed (#5095): use IconButton with
selected, or SegmentedButtons. - Badge (#5013): the
sizeprop is removed; a Badge without children renders a 6dp dot, and with children a 16dp pill. Not in the migration guide yet.
The full generated changelog follows.