- Prop
src- Type
string- Default
- —
- Requirement
- required
Docs Components Assistant
Image
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
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" />;}- parts
- —
- nodes
- —
- size
- —
- part
- —
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>- parts
- —
- nodes
- —
- size
- —
- part
- —
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;- parts
- —
- nodes
- —
- size
- —
- part
- —
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" />- parts
- —
- nodes
- —
- size
- —
- part
- —
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
srcstring—
required
altstring | undefined—
optional
filenamestring | undefined—
optional
zoomableboolean | undefined—
optional
- 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
srcstring—
required
altstring""optional
filenamestring—
optional
zoomablebooleantrueoptional
- 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
srcstring—
required
altstring""optional
filenamestring—
optional
zoomablebooleantrueoptional
- 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
srcstring—
required
altstring""optional
filenamestring—
optional
zoomablebooleantrueoptional
classstring—
optional
stylestring—
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
srcstring—
required
altstring—
optional
filenamestring—
optional
zoomableboolean—
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.