Angular Action Sheet | ng-hub-ui-action-sheet

Angular action sheet opened from a service: actions with roles, grouped or flat, handlers that can refuse to close, and dismissal by backdrop, keyboard or a drag of the sheet.

API reference

Here's the full contract for action-sheet: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial action-sheet in with 10 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
buttonsRequired(HubActionSheetButton | HubActionSheetGroup)[]The actions, flat or in titled groups.
headerstringTitle of the sheet, and its accessible name.
subHeaderstringSecondary line under the header.
variantstringSemantic accent, read as --hub-sys-color-<variant>.
backdropDismissbooleantrueClicking the backdrop dismisses the sheet.
keyboardbooleantrueEscape dismisses the sheet.
swipeToClosebooleantrueDragging the sheet down past its threshold dismisses it.
animationbooleantrueAnimate entry and exit. Ignored under prefers-reduced-motion.
panelClassstring | string[]Extra classes on the sheet element, for theming one sheet.
ariaLabelstringAccessible name when there is no header to give one.

Outputs

No outputs documented yet.

Methods

Drive action-sheet from code — 5 methods on its programmatic surface.

NameSignatureReturnsDescription
HubActionSheet.openopen<D>(options: HubActionSheetOptions<D>): HubActionSheetRef<D>Mounts a sheet on the document and returns the handle to its outcome.
HubActionSheetRef.resultresult: Promise<HubActionSheetResult<D>>Resolves once: with the role and data of the chosen action, or with how the sheet was dismissed.
HubActionSheetRef.closed$closed$: Observable<HubActionSheetResult<D>>The same value as result, for callers living in streams.
HubActionSheetRef.dismissdismiss(role?: 'backdrop' | 'escape' | 'swipe' | string): voidCloses the sheet from the outside, reporting the given role.
provideHubActionSheetprovideHubActionSheet(config: Partial<HubActionSheetConfig>): EnvironmentProvidersSets the application-wide defaults every sheet starts from.

Templates

No templates documented yet.