Blazorise Figure component

Documentation and examples for displaying related images and text with the figure component in Blazorise.

Anytime you need to display a piece of content, like an image with an optional caption, consider using a Figure.

Structure

  • <Figure> the main container.

    • <FigureImage> source image to be displayed.

    • <FigureCaption> optional caption for the image.

Examples

Basic Example

Use the included <Figure>, <FigureImage> and <FigureCaption> classes to provide some baseline styles for the HTML5 figure and figcaption elements.
empty-256x256
A caption for the above image.
<Figure Size="FigureSize.Is256x256">
    <FigureImage Source="img/empty-256x256.png" AlternateText="empty-256x256" />
    <FigureCaption>A caption for the above image.</FigureCaption>
</Figure>

Rounded

Making the figure rounded is easy with the Rounded attribute.
empty-256x256
A caption for the above image.
<Figure Size="FigureSize.Is256x256">
    <FigureImage Source="img/empty-256x256.png" AlternateText="empty-256x256" Rounded />
    <FigureCaption>A caption for the above image.</FigureCaption>
</Figure>

API

Parameters

Figure

Parameter Description TypeDefault
ChildContent

Defines the content rendered inside the figure.

RenderFragmentnull
Size

Specifies the figure size.

Possible values:Default, Is16x16, Is24x24, Is32x32, Is48x48, Is64x64, Is96x96, Is128x128, Is256x256, Is512x512

FigureSizedefault(FigureSize)

FigureImage

Parameter Description TypeDefault
AlternateText

Alternate text for an image.

string
FallbackSource

The fallback image that will be displayed if image loading fails.

string
Rounded

True if container should have a rounded corners.

boolfalse
Source

The absolute or relative URL of the image.

string
On this page