Skip to main content

Card

A card displays a set of content separate from other content on the screen.

Use cases:

  • container for content
  • show collections of related information
  • grouping of content

Example

This simple example shows a card with a title at the top, some nonsense Latin text in the main area, and a (non-responsive) button at the bottom.

Card title

At purus lectus quis habitant commodo, cras. Aliquam malesuada velit a tortor. Felis orci tellus netus risus et ultricies augue aliquet.

Test button

Declaration

<rapid-card></rapid-card>

Usage

@customElement({
name: 'my-element',
template: html`
<rapid-card>
<h4>Card title</h4>
<p>
At purus lectus quis habitant commodo, cras. Aliquam malesuada velit a tortor. Felis orci tellus netus risus et
ultricies augue aliquet.
</p>
<rapid-button>Test button</rapid-button>
</rapid-card>
`,
})
export class MyElement extends GenesisElement {
}

API

Attributes

This component doesn't have any attributes.

Properties

This component doesn't have any properties.

Slots

NameDescription
DefaultThe default slot for the card content.

Parts

This component doesn't have any parts.

Events fired

This component doesn't fire any events.

Events listened to

This component doesn't listen to any events.