-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
<Scrollspy.Provider>
<Nav>
<Nav.Link toggle={Scrollspy} target="anchor-1">
Anchor #1
</Nav.Link>
<Nav.Link toggle={Scrollspy} target="anchor-2">
Anchor #2
</Nav.Link>
</Nav>
<View>
<Scrollspy.Anchor id="anchor-1" />
<Text>Lorem ipsum...</Text>
<Scrollspy.Anchor id="anchor-2">
<Heading>Anchor #2</Heading>
</Scrollspy.Anchor>
<Text>Lorem ipsum...</Text>
</View>
</Scrollspy.Provider>All anchor refs can be stored by id on mounting. On Nav.Link click we need to scroll to the position of the anchor ref. Also we need to track the current active anchor and add active class to the active Nav.Link accordingly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels