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
public class Image : ComponentBase<Image, HTMLImageElement>, ISpecialCaseStyling, IHasBackgroundColorA responsive image element with optional sizing, fit-mode and lazy-loading support.
- Namespace
- Tesserae
- Inheritance
- ComponentBase<Image, HTMLImageElement> → Image
- Implements
- ISpecialCaseStyling, IHasBackgroundColor
Constructors
| Name | Description |
|---|---|
| Image | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| StylingContainer | Gets or sets the styling container. |
| PropagateToStackItemParent | Gets or sets the propagate to stack item parent. |
| Source | Gets or sets the source. |
| Cursor | Gets or sets the CSS cursor of the component. |
| Background | Gets or sets the CSS background of the component. |
public HTMLElement StylingContainerGets or sets the styling container.
public bool PropagateToStackItemParent { get; private set; }Gets or sets the propagate to stack item parent.
public string Cursor { get ; set ; }Gets or sets the CSS cursor of the component.
Methods
| Name | Description |
|---|---|
| Render | Renders the component's root HTML element. |
| Position | Configures the component to position. |
| Contain | Configures the component to contain. |
| Cover | Configures the component to cover. |
| Fill | Configures the component to fill. |
| NoFit | Removes / disables the fit on the component. |
| ScaleDown | Configures the scale down on the component. |
| Circle | Configures the component to circle. |
public Image Position(string objectPosition)Configures the component to position.
| Overload | |
|---|---|
| Circle() | Configures the component to circle. |
| Circle(int) | Configures the component to circle. |