@martineho/ui
v1.0.1
Published
Elegant and fluid UI components
Readme
@martineho/ui
Elegant and fluid UI components for React applications.
Installation
npm install @martineho/uiComponents
Image Gallery
A responsive image gallery component that supports grid and list views.
Usage
To use the Image Gallery component, first import it into your React component:
import { ImageGallery } from "@martineho/ui";Then, you can use the ImageGallery component in your JSX:
function App() {
const images = [
{ src: "image1.jpg", alt: "Image 1", caption: "Image 1" },
{ src: "image2.jpg", alt: "Image 2", caption: "Image 2" },
// Add more images as needed, captions are optional
];
return (
<div>
<h1>My Image Gallery</h1>
<ImageGallery images={images} view="grid" />
</div>
);
}
export default App;Props
images: An array of image objects, each containingsrcandaltproperties.view: A string that determines the layout of the gallery. Options are"grid"or"list".
