vishnu
vishnu

Reputation: 2948

Reactstrap: how to set uncontrolled collapse as open by default

Is there any option to display uncontrolled collapse as opened?

Here is the default code for uncontrolled collapse, it is shown as collapsed tab.

<Button color="primary" id="toggler">
  Toggle
</Button>
<UncontrolledCollapse toggler="#toggler">
  <Card>
    <CardBody>
      Lorem ipsum dolor sit amet consectetur adipisicing...
    </CardBody>
  </Card>
</UncontrolledCollapse>

Upvotes: 1

Views: 364

Answers (1)

Veljko Blagojevic
Veljko Blagojevic

Reputation: 427

Yes, just add:

<UncontrolledCollapse toggler="#toggler" defaultOpen={true}>
...
</UncontrolledCollapse>

Upvotes: 2

Related Questions