Skip to main content
Version: v1 (Current)

Alert

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.

Alert​

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

Repository source

Props​

NameTypeRequired / defaultDescription
variant"default" | "destructive" | null | undefined——

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 { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: (args) => ({
components: { Alert, AlertTitle, AlertDescription },
setup() {
return { args }
},
template: `
<Alert v-bind="args">
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
`,
}),
}

Destructive​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
name: 'Showcase',
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<div class="space-y-4">
<div>
<h3 class="text-lg font-semibold mb-4 text-white">Default</h3>
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Destructive</h3>
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Description Only</h3>
<Alert>
<AlertDescription>
This is a simple alert with only a description.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Title Only</h3>
<Alert>
<AlertTitle>Notice</AlertTitle>
</Alert>
</div>
</div>
`,
}),
}

AlertDescription​

import { AlertDescription } 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 { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: (args) => ({
components: { Alert, AlertTitle, AlertDescription },
setup() {
return { args }
},
template: `
<Alert v-bind="args">
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
`,
}),
}

Destructive​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
name: 'Showcase',
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<div class="space-y-4">
<div>
<h3 class="text-lg font-semibold mb-4 text-white">Default</h3>
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Destructive</h3>
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Description Only</h3>
<Alert>
<AlertDescription>
This is a simple alert with only a description.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Title Only</h3>
<Alert>
<AlertTitle>Notice</AlertTitle>
</Alert>
</div>
</div>
`,
}),
}

AlertTitle​

import { AlertTitle } 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 { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: (args) => ({
components: { Alert, AlertTitle, AlertDescription },
setup() {
return { args }
},
template: `
<Alert v-bind="args">
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
`,
}),
}

Destructive​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
`,
}),
}

Showcase​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Alert, AlertTitle, AlertDescription } from '.'
const defaultArgs = {
variant: 'default',
}
{
name: 'Showcase',
render: () => ({
components: { Alert, AlertTitle, AlertDescription },
template: `
<div class="space-y-4">
<div>
<h3 class="text-lg font-semibold mb-4 text-white">Default</h3>
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Destructive</h3>
<Alert variant="destructive">
<AlertTitle>Error</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Description Only</h3>
<Alert>
<AlertDescription>
This is a simple alert with only a description.
</AlertDescription>
</Alert>
</div>

<div>
<h3 class="text-lg font-semibold mb-4 text-white">Title Only</h3>
<Alert>
<AlertTitle>Notice</AlertTitle>
</Alert>
</div>
</div>
`,
}),
}