gradio/js/gallery
Freddy Boulton c60ad4d34a
Use Gallery as input component (#7148)
* Gallery as input

* add changeset

* Add keep_captions parameter

* revert notebooks

* fix docstring typo

* use tuples

* remove keep_captions

* Update js/app/test/gallery_component_events.spec.ts

Co-authored-by: pngwn <hello@pngwn.io>

* more precise type hint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-01-25 18:51:59 -05:00
..
shared Use Gallery as input component (#7148) 2024-01-25 18:51:59 -05:00
CHANGELOG.md chore: update versions (#7004) 2024-01-19 00:13:02 -05:00
Gallery.stories.svelte Fix stories (#6244) 2023-11-02 12:10:11 +00:00
Gallery.test.ts Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00
Index.svelte Use Gallery as input component (#7148) 2024-01-25 18:51:59 -05:00
package.json Use Gallery as input component (#7148) 2024-01-25 18:51:59 -05:00
README.md Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00

@gradio/gallery

<script>
	import { BaseGallery } from "@gradio/gallery";
</script>

BaseGallery

	export let show_label = true;
	export let label: string;
	export let root = "";
	export let root_url: null | string = null;
	export let value: { image: FileData; caption: string | null }[] | null = null;
	export let columns: number | number[] | undefined = [2];
	export let rows: number | number[] | undefined = undefined;
	export let height: number | "auto" = "auto";
	export let preview: boolean;
	export let allow_preview = true;
	export let object_fit: "contain" | "cover" | "fill" | "none" | "scale-down" =
		"cover";
	export let show_share_button = false;
	export let show_download_button = false;
	export let i18n: I18nFormatter;
	export let selected_index: number | null = null;