Native implementation of Modal.