ResourceCard
Description
A card to display a resource
ResourceCards are used to display a summary of a resource like an AI model, document, or service. They provide optional sections for title, subtitle, tags, description, date, icon, and a footer for commands.
The example below uses a SearchableList in grid mode to render a set of ResourceCards.
API reference
public sealed class ResourceCard : ComponentBase<ResourceCard, HTMLElement>, IHasBackgroundColor, IRoundedStyleA card variant tailored to displaying a single resource (file, item, link) with icon, title, subtitle and actions.
- Namespace
- Tesserae
- Inheritance
- ComponentBase<ResourceCard, HTMLElement> → ResourceCard
- Implements
- IHasBackgroundColor, IRoundedStyle
Constructors
| Name | Description |
|---|---|
| ResourceCard | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| Background | Gets or sets the CSS background of the component. |
Methods
| Name | Description |
|---|---|
| SetIcon | Sets the icon of the component. |
| SetTitle | Sets the title of the component. |
| SetSubtitle | Sets the subtitle of the component. |
| SetTags | Sets the tags of the component. |
| SetDescription | Sets the description of the component. |
| SetDate | Sets the date of the component. |
| SetFooter | Sets the footer of the component. |
| SetFooterCommands | Sets the footer commands of the component. |
| BackgroundColor | Sets the background colour of the card. |
| Border | Configures the component to border. |
| Render | Renders the component's root HTML element. |
public ResourceCard SetIcon(IComponent icon)Sets the icon of the component.
| Overload | |
|---|---|
| SetTitle(IComponent) | Sets the title of the component. |
| SetTitle(string) | Sets the title of the component. |
| Overload | |
|---|---|
| SetSubtitle(IComponent) | Sets the subtitle of the component. |
| SetSubtitle(string) | Sets the subtitle of the component. |
public ResourceCard SetTags(params IComponent[] tags)Sets the tags of the component.
| Overload | |
|---|---|
| SetDescription(IComponent) | Sets the description of the component. |
| SetDescription(string) | Sets the description of the component. |
| Overload | |
|---|---|
| SetDate(IComponent) | Sets the date of the component. |
| SetDate(string) | Sets the date of the component. |
public ResourceCard BackgroundColor(string color)Sets the background colour of the card.
public ResourceCard Border(string color, UnitSize size = null)Configures the component to border.