Image popup
Image modal
<Script :as="modal"> if (state.showModal === undefined) { setState('showModal', true) } const close = () => { setState('showModal', false) } </Script> <Modal :if={state.showModal} onClose={modal.close}> <Flexbox p={20} flexDirection="column" borderRadius="lg" alignItems="center" justifyContent="center" height="100%" position="relative" gap="md" > <Box width="100%"> <Image src={data.image.src} width="100%" borderRadius="md" mb={4} /> <Text :if={data.title} fontSize="2xl" fontWeight="bold" textAlign="center" mb={3} > {data.title} </Text> <Text :if={data.description} fontSize="lg" textAlign="center" color="gray-600" > {data.description} </Text> </Box> <Button variant="dim-filled-outlined" color="danger" action={modal.close} icon="fontisto:close">Close</Button> </Box> </Modal>
{ "image": { "src": "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" }, "title": "Mountain Lake Paradise", "description": "Discover the breathtaking beauty of pristine mountain lakes where crystal-clear waters reflect towering peaks and endless skies. This stunning landscape offers a perfect escape into nature's most spectacular creation." }
Loading...