@anguless/angulux/card
Card
import
import { CardModule } from '@anguless/angulux/card';Basic
A card takes a header string and projects its children as content.
Simple Card
A card groups related content and actions behind one surface. The header comes from the header property; everything else is projected as children.
<agl-card header="Simple Card"> <p>A card groups related content and actions behind one surface. The header comes from the header property; everything else is projected as children.</p></agl-card>With a footer
Header, title, subtitle, content and footer are template slots for anything that needs markup rather than a string.
Advanced Card
With a footer
Header, title, subtitle, content and footer are all template slots, so anything that needs markup rather than a string goes in an ng-template.
<agl-card header="Advanced Card" subheader="With a footer"> <p>Header, title, subtitle, content and footer are all template slots, so anything that needs markup rather than a string goes in an ng-template.</p> <ng-template #footer> <agl-button label="Cancel" severity="secondary" [outlined]="true" /> <agl-button label="Save" /> </ng-template></agl-card>API
Generated from the committed corpus, which check:corpus holds to the built library.
Card
componentagl-cardCard is a flexible container component.
| Input | Type | Default | Description |
|---|---|---|---|
| header | string | undefined | not documented | Header of the card. |
| subheader | string | undefined | not documented | Subheader of the card. |
| style | not documented | Inline style of the element. | |
| style deprecated — since v20.0.0, use `class` instead. | string | undefined | not documented | Class of the element. |
| Template slot | Description |
|---|---|
| <ng-template #header> | Custom header template. |
| <ng-template #title> | Custom title template. |
| <ng-template #subtitle> | Custom subtitle template. |
| <ng-template #content> | Custom content template. |
| <ng-template #footer> | Custom footer template. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |