@angularforge/gallery
API Reference
Inputs, outputs, and interfaces for GalleryComponent.
GalleryComponent Inputs
galleryImages | GalleryImage[] | [] | |
options | GalleryOptions | ||
dialog | DialogShareOptions | ||
lang | 'en' | 'es' | 'en' |
GalleryComponent Outputs
imageChange | number | |
lightboxOpen | number | |
lightboxClose | void | |
lightboxImageChange | number |
GalleryImage
interface GalleryImage {
src: string; // Required — image URL
width: number; // Required — intrinsic width in px
height: number; // Required — intrinsic height in px
alt?: string; // Recommended for accessibility
caption?: string; // Optional caption text
srcset?: string; // Responsive image srcset
sizes?: string; // HTML sizes attribute
loading?: 'lazy' | 'eager' | 'auto';
objectFit?: 'contain' | 'cover' | 'fill' | 'none';
slug?: string;
}GalleryOptions
interface GalleryOptions {
// Visibility
showAllPicturesBtn?: boolean; // default: true
showControls?: boolean; // default: true
fullGallery?: boolean; // default: true
showCount?: boolean; // default: true
showShareBtn?: boolean; // default: true
showBullets?: boolean; // default: false
// Icons
iconFamily?: 'heroicons' | 'lucide' | 'bootstrap'; // UI icon set — default: 'heroicons'
// Layout
layout?: { distribution: Distribution; orientation: 'horizontal' | 'vertical' };
customLayout?: CustomStyles;
layoutStyles?: { border?: string; height?: string; width?: string; gap?: string };
allPictureBtnPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
dialogShareOptions?: DialogShareOptions;
// Navigation
infinityLoop?: boolean; // DISABLED in this version — ignored
closeOnBackdropClick?: boolean; // default: false
// Auto play
autoPlay?: boolean; // default: false
autoPlayInterval?: number; // default: 3000
autoPlayPauseOnHover?: boolean; // default: false
// Lightbox actions
allowDownload?: boolean; // default: false
customActions?: GalleryAction[];
}DialogShareOptions
interface DialogShareOptions {
shareButtons: Array<
'facebook' | 'twitter' | 'linkedin' | 'whatsapp'
| 'email' | 'copy' | 'telegram' | 'instagram'
>;
title: string; // Dialog heading
subtitle: string; // Dialog subheading
description: string; // Dialog body text
picture: string; // Preview image URL for the dialog
}Layout Distributions
options.layout . The naming convention is {top-row-count}/{bottom-row-count} .
default | ||
1/1 | ||
1/2 | ||
1/3 | ||
1/4 | ||
2/2 | ||
2/3 | ||
1/4/1 | ||
5/5 |