Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions docs/component-docs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,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.
1 change: 1 addition & 0 deletions docs/src/data/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const screenshots = {
flat: 'screenshots/chip-1.png',
outlined: 'screenshots/chip-2.png',
},
ConnectedButtonGroup: 'screenshots/connected-button-group.png',
DataTable: 'screenshots/data-table-full-width.png',
'DataTable.Cell': 'screenshots/data-table-row-cell.png',
'DataTable.Header': 'screenshots/data-table-header.png',
Expand Down
20 changes: 20 additions & 0 deletions docs/src/data/themeColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ export const themeColors = {
borderColor: 'theme.colors.outline',
},
},
ConnectedButtonGroup: {
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',
},
},
},
Dialog: {
'-': {
backgroundColor: 'theme.colors.elevation.level3',
Expand Down
2 changes: 2 additions & 0 deletions example/src/ExampleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import CardExample from './Examples/CardExample';
import CheckboxExample from './Examples/CheckboxExample';
import CheckboxItemExample from './Examples/CheckboxItemExample';
import ChipExample from './Examples/ChipExample';
import ConnectedButtonGroupExample from './Examples/ConnectedButtonGroupExample';
import DataTableExample from './Examples/DataTableExample';
import DialogExample from './Examples/DialogExample';
import DividerExample from './Examples/DividerExample';
Expand Down Expand Up @@ -61,6 +62,7 @@ export const mainExamples = {
Checkbox: CheckboxExample,
CheckboxItem: CheckboxItemExample,
Chip: ChipExample,
ConnectedButtonGroup: ConnectedButtonGroupExample,
DataTable: DataTableExample,
Dialog: DialogExample,
Divider: DividerExample,
Expand Down
127 changes: 127 additions & 0 deletions example/src/Examples/ConnectedButtonGroupExample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import * as React from 'react';
import { StyleSheet, View } from 'react-native';

import { ConnectedButtonGroup, List } from 'react-native-paper';

import ScreenWrapper from '../ScreenWrapper';

const sizes = ['extra-small', 'small', 'medium'] as const;

const ConnectedButtonGroupExample = () => {
const [transport, setTransport] = React.useState('walk');
const [align, setAlign] = React.useState('center');
const [formatting, setFormatting] = React.useState<string[]>(['bold']);
const [view, setView] = React.useState('week');

return (
<ScreenWrapper>
<List.Section title="Single select">
<View style={styles.row}>
<ConnectedButtonGroup
value={transport}
onValueChange={setTransport}
buttons={[
{ value: 'walk', label: 'Walking' },
{ value: 'train', label: 'Transit' },
{ value: 'drive', label: 'Driving' },
]}
/>
</View>
</List.Section>

<List.Section title="Icons with selection check">
<View style={styles.row}>
<ConnectedButtonGroup
value={align}
onValueChange={setAlign}
buttons={[
{
value: 'left',
icon: 'format-align-left',
label: 'Left',
showSelectedCheck: true,
},
{
value: 'center',
icon: 'format-align-center',
label: 'Center',
showSelectedCheck: true,
},
{
value: 'right',
icon: 'format-align-right',
label: 'Right',
showSelectedCheck: true,
},
]}
/>
</View>
</List.Section>

<List.Section title="Multi-select (icon only)">
<View style={styles.row}>
<ConnectedButtonGroup
multiSelect
value={formatting}
onValueChange={setFormatting}
buttons={[
{ value: 'bold', icon: 'format-bold', 'aria-label': 'Bold' },
{
value: 'italic',
icon: 'format-italic',
'aria-label': 'Italic',
},
{
value: 'underline',
icon: 'format-underline',
'aria-label': 'Underline',
},
]}
/>
</View>
</List.Section>

<List.Section title="Sizes">
{sizes.map((size) => (
<View style={styles.row} key={size}>
<ConnectedButtonGroup
size={size}
value={view}
onValueChange={setView}
buttons={[
{ value: 'day', label: 'Day' },
{ value: 'week', label: 'Week' },
{ value: 'month', label: 'Month' },
]}
/>
</View>
))}
</List.Section>

<List.Section title="Disabled">
<View style={styles.row}>
<ConnectedButtonGroup
value="week"
onValueChange={() => {}}
buttons={[
{ value: 'day', label: 'Day', disabled: true },
{ value: 'week', label: 'Week', disabled: true },
{ value: 'month', label: 'Month', disabled: true },
]}
/>
</View>
</List.Section>
</ScreenWrapper>
);
};

ConnectedButtonGroupExample.title = 'Connected Button Group';

const styles = StyleSheet.create({
row: {
paddingHorizontal: 16,
paddingVertical: 8,
},
});

export default ConnectedButtonGroupExample;
Loading