Question: Is There a Clickable Card Component in Mantine?
Hi, I'm using Mantine with Dash to create a UI, and I need a component that behaves like a clickable card. Currently, I'm using the Chip component styled as a card to achieve this functionality. Here's my approach:
def chipcard(children, value, className='chip-card', variant='filled', style ={}):
defaults = {"padding": "5px 10px", "borderRadius": "12px", "height": "100%", 'color':'black', 'backgroundColor':'transparent','border':'1px solid #f0ebeb'}
style = {**defaults, **style}
return dmc.Chip(
children =children,
value=value,
className = className,
variant = variant,
styles = {
"label": style,
"input": {"display": "none"}, # Prevents resizing
"checked": {"transform": "none"}, # Prevent transform effect
"iconWrapper": {"display": "none"}, # Hides the checkmark
}
)
I use this inside a ChipGroup to manage the state of selected cards. It works well, but I feel like I’m overcomplicating things.
see the attched video
My Question:
Does Mantine have a built-in Card component that supports click functionality directly?
If not, is my approach reasonable, or is there a simpler way to achieve this behavior using Mantine components?
Any advice or pointers would be greatly appreciated!