Version: 2.0 |

Card

in namespace DotVVM.Framework.Controls.Bootstrap4

Renders the Bootstrap panel.

Properties

Name Type Description Notes Default Value
Content List<ICardItem> Gets or sets the contents of the main section of the panel.
attribute
inner element
static value
bindable
default
FooterTemplate ITemplate Gets or sets the contents of the footer section of the panel.
attribute
inner element
static value
bindable
default
FooterText String Gets or sets footer text
attribute
inner element
static value
bindable
default
HeaderTemplate ITemplate Gets or sets the contents of the header section of the panel.
attribute
inner element
static value
bindable
default
HeaderText String Gets or sets header text.
attribute
inner element
static value
bindable
default
SubtitleText String Gets or sets subtitle of the card.
attribute
inner element
static value
bindable
default
Text String Gets or sets inner text of the card.
attribute
inner element
static value
bindable
default
TitleText String Gets or sets title of the card.
attribute
inner element
static value
bindable
default

Events

Name Type Description

Usage & Scenarios

Renders the Bootstrap card with flexible content options. The card can contain one of more content items:

https://getbootstrap.com/docs/4.1/components/card/

HTML Rendered by the Control

Sample 1: Basic Card

The contents of the card are just placed inside the control element.

You can use HeaderText or HeaderTemplate, and FooterText or FooterTemplate properties to specify contents of the card header and footer bar.

To provide a text content, use CardBody control.

<bs:Card FooterText="Card Footer">
  <HeaderTemplate>
    <h1>Header</h1>
  </HeaderTemplate>

  <bs:CardBody Text="Body of the card" />
</bs:Card>

Sample 2: Card with images and lists

The card can contain images or lists. Use any combination of CardBody, CardImage and CardListGroup controls.

<bs:Card FooterText="Card Footer">
  <bs:CardImage ImageUrl="~/Content/Images/img11.jpg" ToolTip="Card Image">
    <bs:CardBody>
        <h1>Overlayed body</h1>
        <p>
            Another text
        </p>
    </bs:CardBody>
  </bs:CardImage>

  <bs:CardListGroup DataSource="{value: Texts}" TextBinding="{value: _this}" />

  <bs:CardBody>
      <p>Some buttons</p>
      <bs:RouteLink RouteName="Card_Advanced" Text="RouteLink" Type="Info" />
      <bs:Button Click="{command: null}" Text="Button" Type="Danger" />
  </bs:CardBody>
</bs:Card>

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message