Button
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 commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
Button
import { Button } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined | — | — |
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined | — | — |
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | "button" | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
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 { Mail, Loader2, ChevronRight, Plus } from 'lucide-vue-next'
import { Button } from '.'
const defaultArgs = {
variant: 'default',
size: 'default',
}
{
render: (args) => ({
components: { Button },
setup() {
return { args }
},
template: '<Button v-bind="args">Button</Button>',
}),
}
VariantDefault
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Mail, Loader2, ChevronRight, Plus } from 'lucide-vue-next'
import { Button } from '.'
const defaultArgs = {
variant: 'default',
size: 'default',
}
{
name: 'Variant: Default',
render: () => ({
components: { Button },
template: '<Button variant="default">Default</Button>',
}),
}
VariantSecondary
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Mail, Loader2, ChevronRight, Plus } from 'lucide-vue-next'
import { Button } from '.'
const defaultArgs = {
variant: 'default',
size: 'default',
}
{
name: 'Variant: Secondary',
render: () => ({
components: { Button },
template: '<Button variant="secondary">Secondary</Button>',
}),
}