react-advanced-gallery
Version:
A customizable React image gallery component with Bootstrap styling, fullscreen mode, animations, and support for various media types
46 lines (45 loc) • 1.36 kB
TypeScript
export type MediaType = 'image' | 'video' | 'external';
export type GalleryLayout = 'grid' | 'masonry' | 'carousel';
export type AnimationType = 'fade' | 'slide' | 'zoom' | 'none';
export type ThumbnailPosition = 'bottom' | 'top' | 'left' | 'right';
export interface ImageMetadata {
camera?: string;
lens?: string;
aperture?: string;
shutterSpeed?: string;
iso?: string;
focalLength?: string;
dateTaken?: string;
fileSize?: string;
dimensions?: string;
}
export interface GalleryItem {
id: string;
src: string;
thumbnail: string;
alt: string;
title: string;
description: string;
metadata?: ImageMetadata;
type: MediaType;
isFavorite: boolean;
}
export interface GalleryConfigProps {
layout: GalleryLayout;
animation: AnimationType;
thumbnailsPosition: ThumbnailPosition;
enableZoom: boolean;
onConfigChange: (config: Partial<GalleryConfigProps>) => void;
}
export interface GalleryProps {
images: GalleryItem[];
layout?: GalleryLayout;
animation?: AnimationType;
thumbnailsPosition?: ThumbnailPosition;
enableZoom?: boolean;
darkMode?: boolean;
onImageClick?: (image: GalleryItem) => void;
onFavoriteToggle?: (image: GalleryItem) => void;
onImageRemove?: (image: GalleryItem) => void;
onImageUpload?: (files: File[]) => void;
}