Skip to main content
Version: 1.0.0

Dialog

Classic variant

Example banner

Default variant

Example banner

Implementation code

Wrap app.js code with PortalProvider component to use dialog.

import { PortalProvider, NativeProvider } from 'rn-nativeflow';
import Component from './path';

const App = () => {
return (
<NativeProvider>
<PortalProvider>
<Component/>
</PortalProvider>
</NativeProvider>
)
}
export default App;
  • Classic variant
import { Dialog, DialogHead, DialogBody, DialogDescription, DialogFoot, Button } from 'rn-nativeflow';

const Component = () => {
return (
<Dialog isVisible={true} size='lg' variant='classic' onClose={() => {}}>
<DialogHead title='Invite your team' />
<DialogBody>
<DialogDescription>
Elevate user interactions with our versatile modals. Seamlessly integrate notifications, forms, and media displays. Make an impact effortlessly.
</DialogDescription>
</DialogBody>
<DialogFoot>
<Button
variant='outlined'
title='Cancel'
titleColor='#000'
paddingV={10}
paddingH={13}
/>
<Button
variant='contained'
title='Explore'
bg='#000'
titleColor='#fff'
paddingV={10}
paddingH={13}
/>
</DialogFoot>
</Dialog>
);
}
export default Component;
  • Default variant
import { Dialog, DialogHead, DialogBody, DialogDescription, DialogFoot, Button } from 'rn-nativeflow';

const Component = () => {
return (
<Dialog isVisible={true} onClose={() => {}} >
<DialogHead title='Contact US' />
<DialogBody >
<UserInput
cursorColor='#000'
textColor='#000'
label='Password'
variant='outlined'
/>
<UserInput
cursorColor='#000'
textColor='#000'
label='Password'
variant='outlined'
/>
</DialogBody>
<DialogFoot>
<Button
variant='outlined'
title='Cancel'
titleColor='#000'
paddingV={10}
paddingH={13}
/>
<Button
variant='contained'
title='Save'
bg='#000'
titleColor='#fff'
paddingV={10}
paddingH={13}
/>
</DialogFoot>
</Dialog>
);
}
export default Component;

Props

  • Dialog Props
PropTypeDefaultDescription
variantclassic, defaultclassicIt sets the variant of the dialog
isVisiblebooleanfalseIt sets the visibility of the dialog
sizexs, sm, md, lg, fulllgIt sets the horizontal size of the dialog
fullScreenbooleanfalseDialog cover full screen when fullScreen sets to true
backdropColorstringIt sets the backdrop color of the dialog
animationDurationnumber800It change the duration of closing and opening animation
onClosefunctionIt fires when user click on backdrop or try to close the dialog
  • Dialog Head Props
PropTypeDefaultDescription
titlestringIt sets the title of the dialog
containerStylestringHelps to change the styles of the dialog Head container
textStylestringHelps to change the styles of the dialog Head title
  • Dialog Body Props
PropTypeDefaultDescription
scrollEnablebooleantrueIt scroll the content when it overflows from the parent
containerStyleobjectHelps to change the styles of the dialog body container
  • Dialog Description Props
PropTypeDefaultDescription
fsnumber12It sets the font size of the description or text
containerStyleobjectHelps to change the styles of the dialog description container
textStyleobjectHelps to change the styles of the dialog description text
  • Dialog Foot Props
PropTypeDefaultDescription
containerStyleobjectHelps to change the styles of the dialog foot container