Modal
An accessible overlay dialog
Usage
Code EditorCopyimport { Modal } from '@erudilabs/alma'
Component
Here preview and detail explain of Modal
component
Default
import { useState } from 'react'
const [open, setOpen] = useState(false)
Code EditorCopy<div> <Button onClick={() => setOpen(!open)} > Show modal </Button> <Modal open={open} onClose={() => setOpen(!open)} heading="How do I apply installment plan?" subheading="Powered by ErudiFi" action={ <Button theme="primary" block> Continue </Button> } > <div> <p className="text-gray-700 mb-4"> ErudiFi is a mission-driven technology company focused on expanding access to financial services for students. </p> <p className="text-gray-700 mb-4"> Bukas (“Tomorrow / Open” in Tagalog) launched with the vision of building a better tomorrow for Filipino youths, starting with affordable student loans. We work closely with top colleges and universities to provide an easy, secure, and integrated tuition installment plan for students. Some of our notable partner institutions include Far Eastern University (FEU), Mapúa University, National Teachers College, and Lyceum of the Philippines University (LPU). </p> </div> </Modal> </div>
Props Reference
Prop
Type
Default
testId?
string
-
className?
string
-
heading?
string
-
subheading?
string
-
open?
boolean
false
action?
ReactNode
-
onClose?
( ) => void
-