Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
dc2be44
refactor: align List tokens, spacing and typography with MD3
adam-sajko Aug 7, 2026
b85da86
fix: propagate theme override and add three-line padding to List
adam-sajko Aug 19, 2026
f38d80d
fix: use 16dp trailing inset to match MD3
adam-sajko Aug 19, 2026
923a1d9
fix: use container heights in List and the expand token for the chevron
adam-sajko Aug 28, 2026
2564627
test: stabilise the Tooltip pressOut timing
adam-sajko Aug 25, 2026
3fc99ea
refactor: restore the List.Accordion colors helper
adam-sajko Aug 28, 2026
d413581
fix: align List spacing and container heights with MD3
adam-sajko Sep 1, 2026
bd23951
chore: forward accessory styles in the List.Item example
adam-sajko Sep 1, 2026
b965426
feat: detect three-line List rows on web by measuring the description
adam-sajko Sep 1, 2026
369f05c
Merge remote-tracking branch 'upstream/main' into feat/list-md3-token…
adam-sajko Sep 9, 2026
d7e654b
Merge branch 'feat/list-md3-tokens-spacing' into poc/list-three-line-…
adam-sajko Sep 9, 2026
0c662fa
Merge remote-tracking branch 'upstream/main' into feat/list-md3-token…
adam-sajko Sep 15, 2026
e62e3aa
Merge branch 'feat/list-md3-tokens-spacing' into poc/list-three-line-…
adam-sajko Sep 15, 2026
88f4cc1
Merge remote-tracking branch 'upstream/main' into feat/list-md3-token…
adam-sajko Sep 16, 2026
8cd3b78
Merge branch 'feat/list-md3-tokens-spacing' into poc/list-three-line-…
adam-sajko Sep 16, 2026
a60be66
Merge remote-tracking branch 'upstream/main' into feat/list-md3-token…
adam-sajko Oct 13, 2026
ca3d906
Merge branch 'feat/list-md3-tokens-spacing' into poc/list-three-line-…
adam-sajko Oct 13, 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
59 changes: 24 additions & 35 deletions example/src/Examples/ListItemExample.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import { View, StyleSheet } from 'react-native';

import { List, Divider, Checkbox, Avatar, Switch } from 'react-native-paper';

import ScreenWrapper from '../ScreenWrapper';

const CenteredCheckbox = () => (
<View style={styles.centered}>
<Checkbox status="checked" />
</View>
);

const ListItemExample = () => {
return (
<ScreenWrapper>
Expand All @@ -21,16 +13,19 @@ const ListItemExample = () => {
description="Supporting text that is long enough to fill up multiple lines in the item"
/>
<Divider />
<List.Item title="Headline" right={() => <CenteredCheckbox />} />
<List.Item
title="Headline"
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text"
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text that is long enough to fill up multiple lines in the item"
right={() => <Checkbox status="checked" />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<Divider />
</List.Section>
Expand All @@ -54,19 +49,19 @@ const ListItemExample = () => {
<List.Item
title="Headline"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text that is long enough to fill up multiple lines in the item"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <Checkbox status="checked" />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<Divider />
</List.Section>
Expand Down Expand Up @@ -98,23 +93,23 @@ const ListItemExample = () => {
left={(props) => (
<Avatar.Text style={props.style} label="A" size={40} />
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text"
left={(props) => (
<Avatar.Text style={props.style} label="A" size={40} />
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text that is long enough to fill up multiple lines in the item"
left={(props) => (
<Avatar.Text style={props.style} label="A" size={40} />
)}
right={() => <Checkbox status="checked" />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<Divider />
</List.Section>
Expand Down Expand Up @@ -158,7 +153,7 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
Expand All @@ -169,7 +164,7 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
Expand All @@ -180,7 +175,7 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <Checkbox status="checked" />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<Divider />
</List.Section>
Expand Down Expand Up @@ -228,7 +223,7 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
Expand All @@ -240,7 +235,7 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <CenteredCheckbox />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<List.Item
title="Headline"
Expand All @@ -252,56 +247,50 @@ const ListItemExample = () => {
source={require('../../../example/assets/images/strawberries.jpg')}
/>
)}
right={() => <Checkbox status="checked" />}
right={(props) => <Checkbox status="checked" style={props.style} />}
/>
<Divider />
</List.Section>

<List.Section title="With switch">
<List.Item
title="Headline"
right={() => <Switch disabled style={styles.centered} />}
right={(props) => <Switch disabled style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text"
right={() => <Switch disabled style={styles.centered} />}
right={(props) => <Switch disabled style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text that is long enough to fill up multiple lines in the item"
right={() => <Switch disabled />}
right={(props) => <Switch disabled style={props.style} />}
/>
<Divider />
<List.Item
title="Headline"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <Switch disabled style={styles.centered} />}
right={(props) => <Switch disabled style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <Switch disabled style={styles.centered} />}
right={(props) => <Switch disabled style={props.style} />}
/>
<List.Item
title="Headline"
description="Supporting text that is long enough to fill up multiple lines in the item"
left={(props) => <List.Icon {...props} icon="account-outline" />}
right={() => <Switch disabled />}
right={(props) => <Switch disabled style={props.style} />}
/>
<Divider />
</List.Section>
</ScreenWrapper>
);
};

const styles = StyleSheet.create({
centered: {
alignSelf: 'center',
},
});

ListItemExample.title = 'List.Item';

export default ListItemExample;
Loading
Loading