Card is a container component that can be used to display content in a structured way. It can be used to display images, text, and buttons.
Below you can find the basic usage of the Card component. You can use <zinq:card.title>
or <zinq:card.description>
to add a title or description to the card.
You can also put whatever content you want inside the card.
Browse and manage users
<zinq:card class="max-w-xs">
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:button class="mt-6">Go to users →</zinq:button>
</zinq:card>
You can add <zinq:card.link>
to add a button to the card. You can also add a href
attribute to the link to make it a clickable link.
<zinq:card flat class="max-w-xs">
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
You can add <zinq:card.category>
to add a category to the card.
<zinq:card flat class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
Card has a few variants that can be used to change the appearance of the card. Below you can find the available variants.
The flat variant removes the shadow from the card.
<zinq:card flat class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
The inverse variant changes the color of the text to white and the background to the dark color. It inverses the colors of the card in the dark mode.
<zinq:card flat inverse class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card flat emerald class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card flat fuchsia class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card flat yellow class="max-w-xs">
<zinq:card.category>admin</zinq:card.category>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
You can use the grid component to display multiple cards in a grid layout.
You can use the cols
attribute to specify the number of columns in the grid. The Card
component will narrow down to fit the number of columns specified by current screen size.
<zinq:card.grid cols="4">
<zinq:card emerald>
<zinq:card.title>Users</zinq:card.title>
<zinq:card.description>Browse and manage users</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card inverse>
<zinq:card.title>Settings</zinq:card.title>
<zinq:card.description>Manage your account settings</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card fuchsia>
<zinq:card.title>Notifications</zinq:card.title>
<zinq:card.description>Manage your notifications</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
<zinq:card yellow>
<zinq:card.title>Profile</zinq:card.title>
<zinq:card.description>Manage your profile</zinq:card.description>
<zinq:card.link href="#" />
</zinq:card>
</zinq:grid>