Card

GitHub
Create highlighted content blocks with optional links and navigation.

Usage

Use markdown in the default slot of the card component to highlight your content.

Use the title, icon and color props to customize it. You can also pass any property from the <NuxtLink> component.

Startup

Best suited for small teams, startups and agencies with up to 5 developers.
::card{title="Startup" icon="i-lucide:users" color="primary" to="https://nuxt.lemonsqueezy.com" target="_blank"}
Best suited for small teams, startups and agencies with up to 5 developers.
::

API

Props

Prop Default Type

Slots

Slot Type

Theme

We use unocss-variants to customize the theme. Read more about it in the theming guide.

Below is the theme configuration skeleton for the ProseCard. Since the component is provided unstyled by default, you will need to fill in these values to apply your own custom look and feel. If you prefer to use our pre-built, opinionated styling, you can instead use our UnoCSS preset, this docs is using it as well.

app.config.ts
export default defineAppConfig({
  pohon: {
    prose: {
      card: {
        slots: {
          base: '',
          icon: '',
          title: '',
          description: '',
          externalIcon: ''
        },
        variants: {
          color: {
            primary: {
              icon: ''
            },
            secondary: {
              icon: ''
            },
            success: {
              icon: ''
            },
            info: {
              icon: ''
            },
            warning: {
              icon: ''
            },
            error: {
              icon: ''
            },
            neutral: {
              icon: ''
            }
          },
          to: {
            true: ''
          },
          title: {
            true: {
              description: ''
            }
          }
        },
        defaultVariants: {
          color: 'primary'
        }
      }
    }
  }
};
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'

export default defineAppConfig({
  pohon: {
    prose: {
      card: {
        slots: {
          base: '',
          icon: '',
          title: '',
          description: '',
          externalIcon: ''
        },
        variants: {
          color: {
            primary: {
              icon: ''
            },
            secondary: {
              icon: ''
            },
            success: {
              icon: ''
            },
            info: {
              icon: ''
            },
            warning: {
              icon: ''
            },
            error: {
              icon: ''
            },
            neutral: {
              icon: ''
            }
          },
          to: {
            true: ''
          },
          title: {
            true: {
              description: ''
            }
          }
        },
        defaultVariants: {
          color: 'primary'
        }
      }
    }
  }
};

Changelog

No recent changes