Skip to main content
Version: v1 (Current)

Card

Generated from public Vue/TypeScript exports by pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commit fc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.

Card​

import { Card } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}

CardContent​

import { CardContent } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}

CardDescription​

import { CardDescription } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}

CardFooter​

import { CardFooter } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}

CardHeader​

import { CardHeader } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}

CardTitle​

import { CardTitle } from '@gxp-dev/app-ui'

Repository source

Slots​

NameTypeRequired / defaultDescription
default{}——

Examples​

These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>Card description goes here.</CardDescription>
</CardHeader>
<CardContent>
<p>Card content with some example text to demonstrate the layout.</p>
</CardContent>
<CardFooter>
<Button>Action</Button>
</CardFooter>
</Card>
`,
}),
}

WithForm​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'With Form',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<Card class="w-[350px]">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>
<div class="flex flex-col gap-y-4">
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="name">Name</label>
<input
id="name"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
placeholder="Name of your project"
/>
</div>
<div class="flex flex-col gap-y-2">
<label class="text-sm font-medium leading-none" for="framework">Framework</label>
<select
id="framework"
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"
>
<option value="">Select a framework</option>
<option value="next">Next.js</option>
<option value="nuxt">Nuxt</option>
<option value="remix">Remix</option>
<option value="astro">Astro</option>
</select>
</div>
</div>
</form>
</CardContent>
<CardFooter class="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Deploy</Button>
</CardFooter>
</Card>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '.'
import { Button } from '../button'
{
name: 'Showcase',
render: () => ({
components: { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Button },
template: `
<div class="flex flex-wrap items-start gap-6">
<Card class="w-[300px]">
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your call has been confirmed.</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">You have a new message!</p>
</div>
<div class="flex items-center gap-x-3">
<span class="h-2 w-2 rounded-full bg-blue-500"></span>
<p class="text-sm">Your subscription is expiring soon!</p>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Mark all as read</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Payment Method</CardTitle>
<CardDescription>Add a new payment method to your account.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Credit Card</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">PayPal</span>
</div>
<div class="flex items-center gap-x-3 rounded-md border p-3">
<span class="text-sm font-medium">Apple Pay</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button class="w-full">Continue</Button>
</CardFooter>
</Card>

<Card class="w-[300px]">
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Invite your team members to collaborate.</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-col gap-y-3">
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Sofia Davis</p>
<p class="text-xs text-muted-foreground">sofia@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Owner</span>
</div>
<div class="flex items-center justify-between">
<div class="flex flex-col">
<p class="text-sm font-medium">Alex Johnson</p>
<p class="text-xs text-muted-foreground">alex@example.com</p>
</div>
<span class="text-xs text-muted-foreground">Member</span>
</div>
</div>
</CardContent>
<CardFooter>
<Button variant="outline" class="w-full">Invite Member</Button>
</CardFooter>
</Card>
</div>
`,
}),
}