Card
Cards component is used as an entry point to more detailed information. The component can include various sets of elements to serve users' specific needs.
Last updated
Cards component is used as an entry point to more detailed information. The component can include various sets of elements to serve users' specific needs.
Last updated
The card displays some information, and image is also available.
imgSrc
-> Accepts an image link, a string, which is shown inside the card.
imgState
-> Accepts a boolean value, which is used to toggle the image state.
imgAlt
-> Accepts an image alt.
contentHeading
-> Accepts a string value, which is the card heading.
contentPara
-> Accepts a string value, which is card paragraph text.
buttonText
-> Accepts a string value, used as the button name.
onClickFunction
-> Accepts a function, written by the user, which handles the logic when the button is clicked.
id
-> The id prop is similar to the id attribute in HTML. It allows to provide overall component id.
imgLoad
-> The imgLoad prop is mapped to the loading attribute in HTML img tag. It allows to provide overall the value for loading attribute, "lazy" | "eager".
userButtonStyle
-> The custom styling prop which accepts class name(s) for the button styling inside the Card component.
userCardStyle
-> The custom styling prop which accepts class name(s) for the full Card component.
userContentStyle
-> The custom styling prop which accepts class name(s) for the content inside the card component.
This is the code for the Card component.