Docs Components Assistant

Image

React example follows below.
ts
import { Image } from "@grassroot/ui-react/assistant";
export default function ImageDemo() {
return <Image src="/demo/chart-wall.svg" alt="Grassroot chart wall" filename="chart-wall.svg" />;
}
ts
<script setup lang="ts">
import { Image } from "@grassroot/ui-vue/assistant";
</script>
<template>
<Image src="/demo/chart-wall.svg" alt="Grassroot chart wall" filename="chart-wall.svg" />
</template>
ts
import "./ensure-compiler";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootAssistantImage } from "@grassroot/ui-angular/assistant";
@Component({
selector: "app-image-demo",
standalone: true,
imports: [GrassrootAssistantImage],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `<grassroot-assistant-image src="/demo/chart-wall.svg" alt="Grassroot chart wall" filename="chart-wall.svg" />`,
})
export class ImageDemoComponent {
}
export default ImageDemoComponent;
ts
<script lang="ts">
import { Image } from "@grassroot/ui-svelte/assistant";
</script>
<Image src="/demo/chart-wall.svg" alt="Grassroot chart wall" filename="chart-wall.svg" />
ts
/** @jsxImportSource solid-js */
import { Image } from "@grassroot/ui-solid/assistant";
export default function ImageDemo() {
return <Image src="/demo/chart-wall.svg" alt="Grassroot chart wall" filename="chart-wall.svg" />;
}

Installation

API Reference

Import

import { Image } from "@grassroot/ui-react/assistant";

Props

Prop
Type
Default
Requirement
src
string
—
required
alt
string | undefined
—
optional
filename
string | undefined
—
optional
zoomable
boolean | undefined
—
optional
Prop
src
Type
string
Default
—
Requirement
required
Prop
alt
Type
string | undefined
Default
—
Requirement
optional
Prop
filename
Type
string | undefined
Default
—
Requirement
optional
Prop
zoomable
Type
boolean | undefined
Default
—
Requirement
optional

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.

Import

import { Image } from "@grassroot/ui-vue/assistant";

Props

Prop
Type
Default
Requirement
src
string
—
required
alt
string
""
optional
filename
string
—
optional
zoomable
boolean
true
optional
Prop
src
Type
string
Default
—
Requirement
required
Prop
alt
Type
string
Default
""
Requirement
optional
Prop
filename
Type
string
Default
—
Requirement
optional
Prop
zoomable
Type
boolean
Default
true
Requirement
optional

Import

import "./ensure-compiler";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootAssistantImage } from "@grassroot/ui-angular/assistant";

Props

Prop
Type
Default
Requirement
src
string
—
required
alt
string
""
optional
filename
string
—
optional
zoomable
boolean
true
optional
Prop
src
Type
string
Default
—
Requirement
required
Prop
alt
Type
string
Default
""
Requirement
optional
Prop
filename
Type
string
Default
—
Requirement
optional
Prop
zoomable
Type
boolean
Default
true
Requirement
optional

Import

import { Image } from "@grassroot/ui-svelte/assistant";

Props

Prop
Type
Default
Requirement
src
string
—
required
alt
string
""
optional
filename
string
—
optional
zoomable
boolean
true
optional
class
string
—
optional
style
string
—
optional
Prop
src
Type
string
Default
—
Requirement
required
Prop
alt
Type
string
Default
""
Requirement
optional
Prop
filename
Type
string
Default
—
Requirement
optional
Prop
zoomable
Type
boolean
Default
true
Requirement
optional
Prop
class
Type
string
Default
—
Requirement
optional
Prop
style
Type
string
Default
—
Requirement
optional

Content regions

  • children

Import

import { Image } from "@grassroot/ui-solid/assistant";

Props

Prop
Type
Default
Requirement
src
string
—
required
alt
string
—
optional
filename
string
—
optional
zoomable
boolean
—
optional
Prop
src
Type
string
Default
—
Requirement
required
Prop
alt
Type
string
Default
—
Requirement
optional
Prop
filename
Type
string
Default
—
Requirement
optional
Prop
zoomable
Type
boolean
Default
—
Requirement
optional

Content regions

  • children

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.