Tesserae

Image

Description

A responsive image element with optional sizing, fit-mode and lazy-loading support. Use the fluent helpers to set fit behaviour (Cover, Contain), an explicit width / height, or a fallback src shown while the primary image loads.

Usage

API reference

class

Image

public class Image : ComponentBase<Image, HTMLImageElement>, ISpecialCaseStyling, IHasBackgroundColor

A responsive image element with optional sizing, fit-mode and lazy-loading support.

Constructors

Constructor
Image
public Image(string source, string fallback = null)

Initializes a new instance of this class.

Properties

Property
Image.StylingContainer
public HTMLElement StylingContainer

Gets or sets the styling container.

Property
Image.PropagateToStackItemParent
public bool PropagateToStackItemParent { get; private set; }

Gets or sets the propagate to stack item parent.

Property
Image.Source
public string Source { get ; set ; }

Gets or sets the source.

Property
Image.Cursor
public string Cursor { get ; set ; }

Gets or sets the CSS cursor of the component.

Property
Image.Background
public string Background { get ; set ; }

Gets or sets the CSS background of the component.

Methods

Method
Image.Render
public override HTMLElement Render()

Renders the component's root HTML element.

Method
Image.Position
public Image Position(string objectPosition)

Configures the component to position.

Method
Image.Contain
public Image Contain()

Configures the component to contain.

Method
Image.Cover
public Image Cover()

Configures the component to cover.

Method
Image.Fill
public Image Fill()

Configures the component to fill.

Method
Image.NoFit
public Image NoFit()

Removes / disables the fit on the component.

Method
Image.ScaleDown
public Image ScaleDown()

Configures the scale down on the component.

Method
Image.Circle
public Image Circle()

Configures the component to circle.

Method
Image.Circle
public Image Circle(int pixels)

Configures the component to circle.

See also

© 2026 Tesserae. All rights reserved.