Skip to main content

Presenting During Mount

Sometimes, you may want to present the sheet directly during mount. For example, you might want to present the sheet when a screen is opened through a deep link.

onmount

How?

You can do this by setting initialIndex prop. It accepts the size index that your sheet is configured with. See sizes prop for more information.

const App = () => {
return (
<TrueSheet
sizes={['auto', '69%', 'large']}
initialIndex={1}
initialindexanimated
>
<View />
</TrueSheet>
)
}

Disabling Animation

You may want to disable the present animation. To do this, simply set initialIndexAnimated to false.

Using with React Navigation

Using this with react-navigation can cause render issue. Check out the troubleshooting guide for the fix 😉.