Description
The Card widget is a helpful tool that can be used for information display as well as triggering an action
, similar to the button. This component can be customized to include title, text, and image. Additionally, each of these attributes can be placed at either the top, middle, or bottom of the card.
Component Attributes
Name | Default | Required (Y/N) | Extra |
---|---|---|---|
name | Y | The name attribute needs to be unique for each component. When values are returned from the user, the data will be stored in a key-value-pair and made available in Form and Flow XSL files via outgoing context. | |
type | Y | “card” is the only valid value. | |
title | N | Label for the widget. Setting the value to “hidden” has the same result as leaving it empty. | |
contentPos | N | “top” and “bottom” are valid values. This tells the card where to place the title and contentData . When undefined, the header will be on top, contentData on the bottom, and optional image in the center. When “top”, both the contentData and title are grouped at the top of the card, with the image on the bottom. | |
contentData | N | Main text to display other than the title. | |
dataColor | black | N | String or hex value of color to set as the text color. |
dataFontSize | N | pixel. The font-size CSS attribute to be used for the contentData text. | |
fontweightContent | N | “normal”, “bold”, “bolder”, “lighter”, or integers 100-900 where 400 is “normal”. | |
textAlignContent | center | N | “left”, “right”, “center”, to push the contentData to one side or another of the card. |
headerColor | black | N | String or hex value of color to set as the text color. |
headerFontSize | N | pixel. The font-size CSS attribute to be used for the title text. | |
fontweightHeader | N | “normal”, “bold”, “bolder”, “lighter”, or integers 100-900 where 400 is “normal”. | |
textAlignHeader | center | N | “left”, “right”, “center”, to push the contentData to one side or another of the card. |
imageAsBackground | false | N | Boolean that indicates whether an image will be used as the background of the card or not. |
imageData | N | If providing the image via Base64 data, use this attribute instead of src . Be sure to include the proper prefix for the image. e.g. data:image/jpeg;base64, for an encoded jpeg. | |
src | N | If providing the image from a CDN or hosted source, provide the URL to the image with this attribute. | |
submit | N | Boolean, whether or not to send an action to the backend when the card is pressed. The action will use the value indicated by the name attribute. | |
height | N | String value that can be either percentage or pixel. “100%” or “75px”. If width is not set, it’s value will be set to “auto”. | |
width | N | String value that can be either percentage or pixel. “100%” or “75px”. If height is not set, it’s value will be set to “auto”. | |
group | N | Assigns a logical grouping to a single multiple components that allow them to be resized using reactive breakpoints. This is required for colSize to work. | |
colSize | N | Comma separated string of reactive breakpoints and the number of grid spaces acquired by the widget. group must be present in order for this to work. e.g. “col-12, col-sm-8, col-md-6, col-lg-4, col-xl-3” |
Code Examples
<property name="cardComponent1" type="card" group="topRow" colSize="col-12,col-sm-6,col-md-4" height="100px" title="Card Component 1" contentPos="bottom" contentData="Card" textAlign="center" imageAsBackground="false" submit="true" headerColor="#000" dataColor="#000" headerFont="Audrey" headerFontSize="20" dataFontSize="10" src="https://icons-for-free.com/iconfiles/png/512/double+arrow+doublechevronup+up+arrows+icon-1320185729452412251.png" />
<property name="cardComponent2" type="card" group="topRow" colSize="col-12,col-sm-6,col-md-4" height="100px" title="Card Component" contentPos="bottom" contentData="Card" textAlign="center" imageAsBackground="true" submit="true" headerColor="#000" dataColor="#000" headerFont="Audrey" headerFontSize="20" dataFontSize="10" imageData="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAPDQ8NDRAPDw0NDQ8NDQ0NEA8NDw0OFREWFhUVFRUYHSggGBomGxMVITEhJiktLi4uFx8zODMsNygtLisBCgoKDQ0OGg8NFy0dFR0tLS0tLS0tKystLTctLS0rLSstLSsrNystLS0tLTctOCsrNys3Ky0rNy0tKy03KysrLf/AABEIAMIBAwMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAAAQIHAwQFBgj/xABGEAACAgEBAwcHCQUFCQAAAAAAAQIDEQQSITEFBgcTQVFxIjJhdIGxshQjJTVCcpGh0WNzgrTBJDNihLMVNFJTZHWTxOH/xAAYAQEBAQEBAAAAAAAAAAAAAAAAAQIDBP/EABwRAQADAQEBAQEAAAAAAAAAAAABAhExIQNBEv/aAAwDAQACEQMRAD8AugYAAwAAAYkMAGJDAAAAAAABgIYAAAADEMAAAAAAAAQxAAAAAAAACAAAAABDEAERiGAAAAMABAAwAAADHqNRCuO1ZOMI982ooDIBx7OcmnXmK2393VLH4ywYJ845fY0s/GyyFX6hNegA81/t7UPza9PH7052fCc2rn5TtOMtbyY5JtOK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