You can adjust the size of the sheet using CSS classes.
+
+
+
This sheet has custom width classes applied.
+
+
+
+
+
+
+
+ `,
+ imports: [UiSheet, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetTrigger, UiSheetOverlay, UiButton]
+})
+export class SheetSizeExample {}
+
+export const sheetMeta: IComponentMeta = {
+ title: 'Sheet',
+ description: 'Extends the Dialog component to display content that complements the main content of the screen.',
+ installation: {
+ package: 'sheet',
+ import: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';`,
+ usage: `
...
`
+ },
+ api: {
+ props: [
+ { name: 'uiSheetTrigger', type: 'TemplateRef', description: 'Template ref for sheet content.' },
+ { name: 'uiSheetModal', type: 'boolean', description: 'Whether the sheet is modal.' },
+ { name: 'side', type: "'right' | 'left' | 'top' | 'bottom'", description: 'The edge of the screen where the sheet will appear.' },
+ { name: 'class', type: 'string', description: 'Additional CSS classes.' }
+ ]
+ }
+};
+
+export const sheetVariants: IVariant[] = [
+ {
+ title: 'Default',
+ description: 'Basic sheet with header, content, and footer. Slides in from the right by default.',
+ code: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';
+import { UiButton } from '@workspace/ui/directives/button';
+import { UiInput } from '@workspace/ui/directives/input';
+import { UiLabel } from '@workspace/ui/directives/label';
+
+@Component({
+ selector: 'sheet-default-example',
+ template: \`
+
+
+
+
+
+
Edit profile
+
Make changes to your profile here. Click save when you're done.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \`,
+ imports: [UiSheet, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetTrigger, UiSheetOverlay, UiButton, UiInput, UiLabel]
+})
+export class SheetDefaultExample {}`,
+ component: SheetDefaultExample
+ },
+ {
+ title: 'Side',
+ description: 'Use the side property to indicate the edge of the screen where the component will appear.',
+ code: `// Right side (default)
+
...
+
+// Left side
+
...
+
+// Top side
+
...
+
+// Bottom side
+
...
`,
+ component: SheetSideRightExample
+ },
+ {
+ title: 'Left Side',
+ description: 'Sheet that slides in from the left side of the screen.',
+ code: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';
+import { UiButton } from '@workspace/ui/directives/button';
+
+@Component({
+ selector: 'sheet-side-left-example',
+ template: \`
+
+
+
+
+
+
Left Side Sheet
+
This sheet slides in from the left side of the screen.
+
+
+
Content goes here...
+
+
+
+
+
+
+
+ \`,
+ imports: [UiSheet, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetTrigger, UiSheetOverlay, UiButton]
+})
+export class SheetSideLeftExample {}`,
+ component: SheetSideLeftExample
+ },
+ {
+ title: 'Top Side',
+ description: 'Sheet that slides in from the top of the screen.',
+ code: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';
+import { UiButton } from '@workspace/ui/directives/button';
+
+@Component({
+ selector: 'sheet-side-top-example',
+ template: \`
+
+
+
+
+
+
Top Side Sheet
+
This sheet slides in from the top of the screen.
+
+
+
Content goes here...
+
+
+
+
+
+
+
+ \`,
+ imports: [UiSheet, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetTrigger, UiSheetOverlay, UiButton]
+})
+export class SheetSideTopExample {}`,
+ component: SheetSideTopExample
+ },
+ {
+ title: 'Bottom Side',
+ description: 'Sheet that slides in from the bottom of the screen.',
+ code: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';
+import { UiButton } from '@workspace/ui/directives/button';
+
+@Component({
+ selector: 'sheet-side-bottom-example',
+ template: \`
+
+
+
+
+
+
Bottom Side Sheet
+
This sheet slides in from the bottom of the screen.
+
+
+
Content goes here...
+
+
+
+
+
+
+
+ \`,
+ imports: [UiSheet, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetTrigger, UiSheetOverlay, UiButton]
+})
+export class SheetSideBottomExample {}`,
+ component: SheetSideBottomExample
+ },
+ {
+ title: 'Size',
+ description: 'You can adjust the size of the sheet using CSS classes.',
+ code: `import { UiSheet, UiSheetTrigger, UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter, UiSheetOverlay } from '@workspace/ui/directives/sheet';
+import { UiButton } from '@workspace/ui/directives/button';
+
+@Component({
+ selector: 'sheet-size-example',
+ template: \`
+
+
+
+
+
+
Custom Size Sheet
+
You can adjust the size of the sheet using CSS classes.