Card

The Card component used to display content related to a single subject in a visually engaging and organized manner.

Usage

Nuxt Architecture

Harness the full power of Nuxt 3 and its modules ecosystem.

MDC
::card{icon=logos:nuxt-icon}
#title
Nuxt Architecture
#description
Harness the full power of [Nuxt 3](https://v3.nuxtjs.org) and its [modules](https://modules.nuxtjs.org) ecosystem.
::

Visual effects

You can add visual effects to your card by using the lights and noise props.

Nuxt Architecture

Harness the full power of Nuxt 3 and its modules ecosystem.

MDC
::card{icon=logos:nuxt-icon noise lights style="--docux-landing-card-noise-opacity: 0.3;"}
#title
Nuxt Architecture
#description
Harness the full power of [Nuxt 3](https://v3.nuxtjs.org) and its [modules](https://modules.nuxtjs.org) ecosystem.
::

Customization

You are able to customize the Card by updating design tokens from tokens.config file.

Nuxt Studio ready

Edit your theme content and appearance with live-preview within Nuxt Studio.

Props

PropTypeDefaultDescription
iconString''Icon name from Iconify
col[String, Number, Object]1Amount of columns Card takes inside CardGrid
row[String, Number, Object]1Amount of rows Card takes inside CardGrid
noiseBooleanfalseAdd noise filter effect
lightsBooleanfalseAdd cursor lights effect

Slots

SlotDescription
defaultA slot for any arbitrary content
titleA slot for title content
descriptionA slot for description content

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
   docux: {
      landing: {
         card: {
            padding: '{space.1}',
            borderRadius: '{radii.sm}',
            borderWidth: '0px',
            borderStyle: 'solid',
            borderColor: 'rgba({temp.color.gray.800}, 0.5)',
            backgroundColor: 'transparent',
            backgroundImage: 'none',
            backdropFilter: '{elements.backdrop.filter}',
            boxShadow: 'none',
            minHeight: 'auto',
            wrapper: {
               borderRadius: '{radii.xs}',
               backgroundColor: 'transparent',
               backgroundImage: {
                  initial: 'linear-gradient(135deg, rgba({temp.color.gray.100}, 0.5), rgba({temp.color.gray.200}, .5))',
                  dark: 'linear-gradient(135deg, rgba({temp.color.gray.800}, 0.4), rgba({temp.color.gray.800}, .7))'
               }
            },
            noise: {
               opacity: {
                  initial: '0.2',
                  dark: '0.2'
               }
            },
            content: {
               padding: '{space.8}'
            },
            icon: {
               marginBottom: '{space.4}',
               width: '{space.6}',
               height: '{space.6}',
               padding: '{space.3}',
               borderRadius: '{radii.xs}',
               backgroundColor: {
                  initial: 'rgba({temp.color.gray.300}, 0.2)',
                  dark: 'rgba({temp.color.gray.900}, 0.2)'
               },
               boxShadow: 'inset -0.5px 0.5px 0px hsla(0,0%,100%,.1), inset 0.5px 0px 0px hsla(0,0%,100%,.1)'
            },
            title: {
               marginBottom: '{space.2}',
               fontSize: '{text.2xl.fontSize}',
               lineHeight: '{text.2xl.lineHeight}',
               fontWeight: '{fontWeight.medium}',
               letterSpacing: '{letterSpacing.tight}',
               color: '{elements.text.primary.color.static}'
            },
            description: {
               fontSize: '{text.sm.fontSize}',
               lineHeight: '{text.sm.lineHeight}',
               fontWeight: '{fontWeight.medium}',
               color: '{elements.text.secondary.color.static}'
            }
         },
      }
   }
})