Package Exports
- simple-image-view
- simple-image-view/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simple-image-view) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Image Viewer
A customizable image viewer component for React with Material UI.
Installation
bash npm install simple-image-view or yarn add simple-image-view
Usage
jsx import React, { useState } from 'react'; import { Button } from '@mui/material'; import { ImageViewer } from 'react-mui-image-viewer'; function App() { const [open, setOpen] = useState(false); return (
Props
Prop | Type | Required | Description |
---|---|---|---|
open | boolean | Yes | Controls whether the image viewer is displayed |
onClose | () => void | Yes | Function called when the viewer is closed |
imageUrl | string | Yes | URL of the image to display |
alt | string | No | Alt text for the image (default: "image") |
License
MIT