placeholder property of select tag in antd not working

430 views reactjs

This is the code snippet I'm using. The placeholder is not showing in UI.

 <Select placeholder="Select A User Role">

                    <Option value='2'>Company Admin</Option>
                    <Option value='3'>Company User</Option>

answered question

@DragonBorn SO means Ant Design's Select component.

1 Answer


You need to set the width to see it

<Select placeholder="Select A User Role" style={{ width: 200 }}>
  <Option value="2">Company Admin</Option>
  <Option value="3">Company User</Option>

Working example:

posted this

Have an answer?


Please login first before posting an answer.