Use the header, default and footer slots to add content to the Card.
<template>
<PCard>
<template #header>
<CorePlaceholder class="h-8" />
</template>
<CorePlaceholder class="h-32" />
<template #footer>
<CorePlaceholder class="h-8" />
</template>
</PCard>
</template>
Use the variant prop to change the variant of the Card.
<template>
<PCard variant="subtle">
<template #header>
<CorePlaceholder class="h-8" />
</template>
<CorePlaceholder class="h-32" />
<template #footer>
<CorePlaceholder class="h-8" />
</template>
</PCard>
</template>
| Prop | Default | Type |
|---|
| Slot | Type |
|---|
Below is the theme configuration skeleton for the PCard. 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.
export default defineAppConfig({
pohon: {
card: {
slots: {
root: '',
header: '',
body: '',
footer: ''
},
variants: {
variant: {
solid: {
root: ''
},
outline: {
root: ''
},
soft: {
root: ''
},
subtle: {
root: ''
}
}
},
defaultVariants: {
variant: 'outline'
}
}
}
};
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import pohon from 'pohon-ui/vite'
export default defineAppConfig({
pohon: {
card: {
slots: {
root: '',
header: '',
body: '',
footer: ''
},
variants: {
variant: {
solid: {
root: ''
},
outline: {
root: ''
},
soft: {
root: ''
},
subtle: {
root: ''
}
}
},
defaultVariants: {
variant: 'outline'
}
}
}
};