Separator
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.
Separator
import { Separator } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
orientation | DataOrientation | undefined | "horizontal" | Orientation of the component. Either vertical or horizontal. Defaults to horizontal. |
decorative | boolean | undefined | true | Whether or not the component is purely decorative. <br>When true, accessibility-related attributes are updated so that that the rendered element is removed from the accessibility tree. |
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 | — | The element or component this component should render as. Can be overwritten by asChild. |
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 { Separator } from '.'
const defaultArgs = {
orientation: 'horizontal',
decorative: true,
}
{
render: (args) => ({
components: { Separator },
setup() {
return { args }
},
template: `
<div class="space-y-4 max-w-md">
<div>
<h4 class="text-sm font-medium leading-none text-foreground">Section Title</h4>
<p class="text-sm text-muted-foreground">Some descriptive text above the separator.</p>
</div>
<Separator v-bind="args" />
<div>
<p class="text-sm text-muted-foreground">Content below the separator.</p>
</div>
</div>
`,
}),
}
Vertical
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Separator } from '.'
const defaultArgs = {
orientation: 'horizontal',
decorative: true,
}
{
name: 'Vertical',
render: () => ({
components: { Separator },
template: `
<div class="flex items-center h-5 space-x-4 text-sm">
<span class="text-foreground">Blog</span>
<Separator orientation="vertical" />
<span class="text-foreground">Docs</span>
<Separator orientation="vertical" />
<span class="text-foreground">Source</span>
</div>
`,
}),
}
Showcase
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Separator } from '.'
const defaultArgs = {
orientation: 'horizontal',
decorative: true,
}
{
name: 'Showcase',
render: () => ({
components: { Separator },
template: `
<div class="space-y-8 max-w-md">
<div>
<h3 class="text-lg font-semibold mb-4 text-foreground">Horizontal Separator</h3>
<div class="space-y-4">
<p class="text-sm text-muted-foreground">Content above</p>
<Separator />
<p class="text-sm text-muted-foreground">Content below</p>
</div>
</div>
<div>
<h3 class="text-lg font-semibold mb-4 text-foreground">Vertical Separator</h3>
<div class="flex items-center h-5 space-x-4 text-sm">
<span class="text-foreground">Home</span>
<Separator orientation="vertical" />
<span class="text-foreground">About</span>
<Separator orientation="vertical" />
<span class="text-foreground">Contact</span>
</div>
</div>
</div>
`,
}),
}