Skip to content

How do you get Instance using API ?, and how do you get the current state of it ? #908

Answered by zoltanszogyenyi
ChaerilM asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @ChaerilM,

Please make sure that the window or document is loaded:

window.addEventListener('load', function() {
    const modal = FlowbiteInstances.getInstance('Modal', 'modal-id');
})

More on this here: https://flowbite.com/docs/getting-started/javascript/#instance-manager

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ChaerilM
Comment options

@zoltanszogyenyi
Comment options

@ChaerilM
Comment options

Answer selected by ChaerilM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants