Skip to content

Picker items should take Text styles #2907

Closed
react-native-picker/picker
#58

Description

Proposal: Picker items should take Text styles

Summary

Currently, Picker items only have View props, not Text props. This makes it impossible to change their font and font size, among other things. It would be nice to be able to customize the children more easily, or use arbitrary child elements, though for my purposes simply being able to change those two properties (font and font size) would be sufficient.

Motivation

I am attempting to create search filters using Picker in RNW, but the built-in font and font size in Picker items does not match the design I am trying to implement, and there is no apparent way to change them from typescript. Seeing as they are essentially plain text boxes, I expected their props to reflect that and include text styling. I believe the IOS Picker already supports this through an itemStyle prop, which would also be helpful.

Open Questions

Could we ever see child components for these Picker Items? I'd love to be able to do something like:
<Picker.Item>
<Text>Color:</Text>
<Text>Blue</Text>
</Picker.Item>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions