Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
76e24a5
feat(connected-button-group): add Material Design 3 connected button …
matkoson Jul 14, 2026
91f1f79
test(connected-button-group): cover selection, sizing and colors
matkoson Jul 14, 2026
9a4f5d0
docs(connected-button-group): showcase in example app and theme colors
matkoson Jul 14, 2026
09967f9
fix(connected-button-group): apply disabled container color via opaci…
matkoson Jul 14, 2026
db5ae39
fix(connected-button-group): align shapes and roles with M3 spec
matkoson Jul 14, 2026
4fce0ef
refactor(connected-button-group): reuse shared theme utilities
matkoson Jul 14, 2026
91ed2b5
docs(connected-button-group): add docs page and fix deprecation link
matkoson Jul 14, 2026
f610393
Merge branch 'callstack:main' into feat/connected-button-group
oleksandrzavarzin-callstack Aug 24, 2026
cb5886a
refactor: move types + updated the docs
oleksandrzavarzin-callstack Aug 25, 2026
50cf25f
fix: restore icon to check animation
oleksandrzavarzin-callstack Aug 25, 2026
d3d98f3
fix: improve button morph animation stability
oleksandrzavarzin-callstack Aug 25, 2026
78a5b51
refactor: move morphingCorners and other minor corrections
oleksandrzavarzin-callstack Aug 25, 2026
376df7b
refactor: remove connectedButtonGroup from 5.x docs
oleksandrzavarzin-callstack Aug 27, 2026
7eaf3c9
refactor: separate gaps for check & leading icon
oleksandrzavarzin-callstack Aug 27, 2026
09af076
refactor: declare values outside of ConditionalValue
oleksandrzavarzin-callstack Aug 27, 2026
2b80433
Merge remote-tracking branch 'origin/main' into feat/connected-button…
oleksandrzavarzin-callstack Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions docs/5.x/docs/components/ConnectedButtonGroup/ConnectedButtonGroup.mdx
Comment thread
oleksandrzavarzin-callstack marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
title: ConnectedButtonGroup
---

import PropTable from '@docs/components/PropTable.tsx';
import ExtendsLink from '@docs/components/ExtendsLink.tsx';
import ThemeColorsTable from '@docs/components/ThemeColorsTable.tsx';
import ScreenshotTabs from '@docs/components/ScreenshotTabs.tsx';
import ExtendedExample from '@docs/components/ExtendedExample.tsx';

Connected button groups let people select from a set of related options, switch views or sort elements. They are the Material Design 3 successor to `SegmentedButtons`: selected buttons morph to a fully-rounded shape and the group supports single- and multi-select.

<ScreenshotTabs screenshotData="screenshots/connected-button-group.png" />

## Usage

```js
import * as React from 'react';
import { SafeAreaView, StyleSheet } from 'react-native';
import { ConnectedButtonGroup } from 'react-native-paper';

const MyComponent = () => {
const [value, setValue] = React.useState('walk');

return (
<SafeAreaView style={styles.container}>
<ConnectedButtonGroup
value={value}
onValueChange={setValue}
buttons={[
{ value: 'walk', label: 'Walking' },
{ value: 'train', label: 'Transit' },
{ value: 'drive', label: 'Driving' },
]}
/>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
},
});

export default MyComponent;
```

## Props

<span />

<div>

### buttons (required)

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="buttons" />

<div>

### size

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="size" />

<div>

### style

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="style" />

<div>

### testID

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="testID" />

<div>

### theme

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="theme" />

<span />

## Theme colors

<ThemeColorsTable
themeColorsData={{
checked: {
'-': {
backgroundColor: 'theme.colors.secondaryContainer',
textColor: 'theme.colors.onSecondaryContainer',
},
},
unchecked: {
'-': {
backgroundColor: 'theme.colors.surfaceContainer',
textColor: 'theme.colors.onSurfaceVariant',
},
},
disabled: {
'-': {
backgroundColor: 'theme.colors.onSurface',
textColor: 'theme.colors.onSurface',
},
},
}}
componentName="ConnectedButtonGroup"
/>

<span />
3 changes: 3 additions & 0 deletions docs/5.x/docs/components/ConnectedButtonGroup/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"ConnectedButtonGroup"
]
7 changes: 7 additions & 0 deletions docs/5.x/docs/components/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
"collapsible": true,
"collapsed": false
},
{
"type": "dir",
"name": "ConnectedButtonGroup",
"label": "ConnectedButtonGroup",
"collapsible": true,
"collapsed": false
},
{
"type": "dir",
"name": "DataTable",
Expand Down
112 changes: 112 additions & 0 deletions docs/6.x/docs/components/ConnectedButtonGroup/ConnectedButtonGroup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: ConnectedButtonGroup
---

import PropTable from '@docs/components/PropTable.tsx';
import ExtendsLink from '@docs/components/ExtendsLink.tsx';
import ThemeColorsTable from '@docs/components/ThemeColorsTable.tsx';
import ScreenshotTabs from '@docs/components/ScreenshotTabs.tsx';
import ExtendedExample from '@docs/components/ExtendedExample.tsx';

Connected button groups let people select from a set of related options,
switch views or sort elements. They are the Material Design 3 successor to
`SegmentedButtons`: selected buttons morph to a fully-rounded shape and the
group supports single- and multi-select.




<ScreenshotTabs screenshotData={"screenshots/connected-button-group.png"}/>


## Usage
```js
import * as React from 'react';
import { SafeAreaView, StyleSheet } from 'react-native';
import { ConnectedButtonGroup } from 'react-native-paper';

const MyComponent = () => {
const [value, setValue] = React.useState('walk');

return (
<SafeAreaView style={styles.container}>
<ConnectedButtonGroup
value={value}
onValueChange={setValue}
buttons={[
{ value: 'walk', label: 'Walking' },
{ value: 'train', label: 'Transit' },
{ value: 'drive', label: 'Driving' },
]}
/>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
},
});

export default MyComponent;
```


## Props
<span />



<div>

### buttons (required)

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="buttons" />

<div>

### size

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="size" />

<div>

### style

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="style" />

<div>

### testID

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="testID" />

<div>

### theme

</div>

<PropTable componentLink="ConnectedButtonGroup/ConnectedButtonGroup" prop="theme" />



<span />


## Theme colors

<ThemeColorsTable themeColorsData={{"checked":{"-":{"backgroundColor":"theme.colors.secondaryContainer","textColor":"theme.colors.onSecondaryContainer"}},"unchecked":{"-":{"backgroundColor":"theme.colors.surfaceContainer","textColor":"theme.colors.onSurfaceVariant"}},"disabled":{"-":{"backgroundColor":"theme.colors.onSurface","textColor":"theme.colors.onSurface"}}}} componentName="ConnectedButtonGroup" />


<span />
3 changes: 3 additions & 0 deletions docs/6.x/docs/components/ConnectedButtonGroup/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"ConnectedButtonGroup"
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ import ThemeColorsTable from '@docs/components/ThemeColorsTable.tsx';
import ScreenshotTabs from '@docs/components/ScreenshotTabs.tsx';
import ExtendedExample from '@docs/components/ExtendedExample.tsx';

@deprecated Segmented buttons are deprecated in the Material Design 3 spec
and replaced by the Connected Button Group. Use `ConnectedButtonGroup`
instead — it takes the same `buttons`, `value` and `onValueChange` props for
both the single- and multi-select models. The only prop without a direct
equivalent is `density`: pick a `size` from the Material Design 3
button-group scale instead, where the default `"small"` (40dp) is the
closest match to a `"regular"` density segmented button.

Segmented buttons can be used to select options, switch views or sort elements.


Expand Down
7 changes: 7 additions & 0 deletions docs/6.x/docs/components/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
"collapsible": true,
"collapsed": false
},
{
"type": "dir",
"name": "ConnectedButtonGroup",
"label": "ConnectedButtonGroup",
"collapsible": true,
"collapsed": false
},
{
"type": "dir",
"name": "DataTable",
Expand Down
3 changes: 3 additions & 0 deletions docs/component-docs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const pages = {
Chip: {
Chip: 'Chip/Chip',
},
ConnectedButtonGroup: {
ConnectedButtonGroup: 'ConnectedButtonGroup/ConnectedButtonGroup',
},
DataTable: {
DataTable: 'DataTable/DataTable',
DataTableCell: 'DataTable/DataTableCell',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading