GitHub
FormsList

List

The <List /> element represents a scrollable list for the selection of predefined options.

import { View, Text, List } from '@react-pdf/renderer';

const field = { height: 54, borderWidth: 1, borderColor: '#c9c2b6' };
const label = { fontSize: 9, color: '#3e3e3e', marginBottom: 4 };

const Countries = () => (
  <View>
    <Text style={label}>Countries</Text>
    <List
      name="countries"
      multiSelect
      select={['Argentina', 'Japan', 'Kenya']}
      style={field}
    />
  </View>
);
Show preview

Valid props

For attributes head to Select and List Attributes.

On this page