- Prop
src- Type
string | undefined- Default
- —
- Requirement
- optional
Docs Components Uncategorized
Figure
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 { Figure } from "@grassroot/ui-react"; export default function FigureDemo() { return ( <Figure title="A figure can render an image or supplied children."> <div aria-label="Figure content">Figure content</div> </Figure> );}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { Figure } from "@grassroot/ui-vue";</script> <template> <Figure title="A figure can render an image or supplied children."> <div aria-label="Figure content">Figure content</div> </Figure></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { Component } from "@angular/core";import { GrassrootFigure } from "@grassroot/ui-angular"; @Component({ selector: "app-figure-demo", standalone: true, imports: [GrassrootFigure], host: { style: "display: contents" }, template: ` <grassroot-figure title="A figure can render an image or supplied children."> <div aria-label="Figure content">Figure content</div> </grassroot-figure> `,})export class FigureDemoComponent {} export default FigureDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { Figure } from "@grassroot/ui-svelte";</script> <Figure title="A figure can render an image or supplied children."> <div aria-label="Figure content">Figure content</div></Figure>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { Figure } from "@grassroot/ui-solid"; export default function FigureDemo() { return ( <Figure title="A figure can render an image or supplied children."> <div aria-label="Figure content">Figure content</div> </Figure> );}Installation
API Reference
Import
import { Figure } from "@grassroot/ui-react";
Props
Prop
Type
Default
Requirement
srcstring | undefined—
optional
altstring | undefined—
optional
- Prop
alt- Type
string | undefined- Default
- —
- Requirement
- optional
Content regions
title
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { Figure } from "@grassroot/ui-vue";
Props
Prop
Type
Default
Requirement
srcstring | undefined—
optional
altstring | undefined—
optional
titlestring | undefined—
optional
- Prop
src- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
alt- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
title- Type
string | undefined- Default
- —
- Requirement
- optional
Content regions
defaulttitle
Import
import { Component } from "@angular/core";
import { GrassrootFigure } from "@grassroot/ui-angular";
Props
Prop
Type
Default
Requirement
srcstring—
optional
altstring""optional
titlestring—
optional
classNamestring—
optional
- Prop
src- Type
string- Default
- —
- Requirement
- optional
- Prop
alt- Type
string- Default
""- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Content regions
defaulttitle
Import
import { Figure } from "@grassroot/ui-svelte";
Props
Prop
Type
Default
Requirement
srcstring—
optional
altstring""optional
classstring—
optional
- Prop
src- Type
string- Default
- —
- Requirement
- optional
- Prop
alt- Type
string- Default
""- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
Content regions
childrentitle
Import
import { Figure } from "@grassroot/ui-solid";
Props
Prop
Type
Default
Requirement
srcstring—
optional
altstring—
optional
classNamestring—
optional
- Prop
src- Type
string- Default
- —
- Requirement
- optional
- Prop
alt- Type
string- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Content regions
childrentitle
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.