Card (Alpha)
This feature is currently in its Alpha stage of development.
As an early version, it may not include all planned functionalities and is subject to significant changes based on ongoing development and user feedback.
In this phase, the feature may contain bugs or behave unpredictably.
Jigx recommends using standard, fully supported components until this feature has been fully tested and refined.
We encourage you to provide feedback and report any issues to help us improve and refine the feature for future releases.
The card component adds context or highlights information in the jig. The card itself is a container with integrated padding, background, and row rules, meaning every component placed in the card will be represented as a separate row with spaces between the rows.
For steps on creating a custom component, see How to create a custom component.
Configuration options
You can use when and instanceId with component.card, add the properties before the options property. The available list of options is shown below.
color
Multiple, use IntelliSense to view the available list.
direction
row - creates a vertical layout in a row. column - creates a horizontal layout in a column.
emphasis
extra-low, low, low-medium, medium, high
onPress
Multiple, use IntelliSense to view the available list of . The action is called when the card is pressed.
style
isDisabled - true or false
Considerations
The card component has predefined behavior for its children, ensuring the children's components, such as images, are flexible by default.
The View (Alpha) component combined with the card enables the precision of the layout design. For example, the view can be used to create rows to contain cards and provide spacing between the cards.
When using
component.imageon custom components, theisFlexibleproperty is available. If the property is set totruethe image will take the parent's space. If the parent has zero height or zero width, the image will not render. It would be best if you decided either to set theheightandwidthon the image or setisFlexibletotrue.The recommended approach when using
component.imageis to use component view as a wrapper component with a definedheight,e.g., 100, and settingisFlexible: truefor each image. This allows the images to grow into the parent component space.By default,
childrencomponents are stacked in a column.
Example and code snippets
Card

Cards with images

Cards in a list
This example shows how to use the component.card in a component.list. In the card is an image and view component. the view is used to create the layout positions for the icon, text, and button components below the image.
Examples:

Card with charts

This example demonstrates how to show a line-chart component in a component.card. Take note of how the layout configuration is created by using the component.view multiple times and even inside another component.view. In the jig configuration inputs are required for the chart in the custom component to reference the datasource.
Examples:
Multiple horizontal cards
This example demonstrates how to use the view component to create the row layout for multiple card components to create three cards displayed horizontally.
Take note of how the layout configuration is created by using the view component multiple times and even inside the card to create the correct layout for the icon and text components.
Examples:

Other card examples
Explore a variety of additional code examples demonstrating the use of the card component on GitHub. These examples showcase different configurations and use cases to help you get the most out of the card component.
Last updated
Was this helpful?