Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

BottomSheet

Present a short modal task on a sheet anchored to the bottom of the viewport.

Category
Overlays
Import
@neural-ui/core/bottom-sheet
Selector
neu-bottom-sheet
import { NeuBottomSheetComponent } from '@neural-ui/core/bottom-sheet';

Usage

The application owns open. Bind it and handle closeRequested by applying false when closing is accepted. opened and closed report lifecycle transitions, not replacement values for open. Project body content and the available header/footer slots. Keep a named trigger in the page so focus can return after dismissal. disableClose only blocks automatic dismissals; provide an explicit completion action.

Examples

Try this application-owned interaction. Its event handling and initial data are included in Code.

Examples

Events: 0

Try and configure

Change the public options, try the result and inspect the updated template. Code contains the complete executable implementation.

Try and configure

Events: 0

template.html
<button neu-button (neuClick)="open.set(true)">
  {{ t("Open example", "Abrir ejemplo") }}</button
><neu-bottom-sheet
  [open]="open()"
  [size]="'md'"
  [disableClose]="false"
  [closeLabel]="'Close'"
  (closeRequested)="open.set(false); record('closeRequested', $event)"
  (opened)="record('opened')"
  (closed)="record('closed')"
  [title]="'Review changes'"
><p>
    {{
      t(
        "Review the content, then close to return to the trigger.",
        "Revisa el contenido y cierra para regresar al activador."
      )
    }}
  </p>
  <button neu-button variant="outline" (neuClick)="open.set(false)">
    {{ t("Done", "Terminar") }}
  </button></neu-bottom-sheet
>

State and events

The application owns open. Bind it and handle closeRequested by applying false when closing is accepted. opened and closed report lifecycle transitions, not replacement values for open. Project body content and the available header/footer slots. Keep a named trigger in the page so focus can return after dismissal. disableClose only blocks automatic dismissals; provide an explicit completion action.

Accessibility and keyboard

Tab remains in a modal surface. Escape requests dismissal when enabled. Closing returns focus to the original trigger; persistent Sidebar is normal page navigation rather than a modal task.

Key
Action
Tab In modal mode, move through controls inside the surface. A persistent sidebar follows normal page order.
Shift + Tab Move backwards through the focus order; modal focus stays inside the surface.
Escape Request dismissal when enabled; closing restores focus to the trigger.

API

Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.

Inputs

Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.

Name
Type
Default
Template binding
Description
ariaLabelstring''[ariaLabel]Accessible name of the control or region.
backdropbooleantrue[backdrop]Show the sheet backdrop behind the modal surface.
closeLabelstring'Close'[closeLabel]Label for close preview. Translate it for your application.
disableClosebooleanfalse[disableClose]Prevent automatic Escape/backdrop dismissal; keep an explicit completion action available.
initialFocusstring'first'[initialFocus]Choose the initial focus strategy or selector when the sheet opens.
openbooleanfalse[open]Application-owned visibility. Apply false when the requested dismissal is accepted.
sizeNeuBottomSheetSize'md'[size]Control size. The accepted scale or numeric unit is specified by its type.
titlestring''[title]Optional visible title above projected content.

Outputs

Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.

Name
Payload
Template binding
Description
closedvoid(closed)="onClosed($event)"Reports closure of this component. Consult the payload type for the emitted data.
closeRequestedNeuCloseRequest(closeRequested)="onCloseRequested($event)"Requests dismissal with its reason and original event. The application accepts by applying open=false.
openedvoid(opened)="onOpened($event)"Reports opening of this component. Consult the payload type for the emitted data.

Templates

ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.

Name
Mechanism
Contract
*

Projected content

View example
Content projection

Application-provided content.

<ng-content />

Context used: โ€”

Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.

Projected content

*

Projected content

Events: 0

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.

Specific tokens

This component uses shared theme tokens rather than dedicated component hooks.

Shared tokens used

Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.

Token
Purpose here
Other impact
Default / fallback
--neu-border Normal control and cell borders Shared by other Core consumers; scope the override. rgba(15, 23, 42, 0.08)
--neu-surface Main field, header or control surface Shared by other Core consumers; scope the override. #ffffff
--neu-text Main text and inherited icon color Shared by other Core consumers; scope the override. #0f172a
--neu-overlay-bg Inherited theme value used by this component Shared by other Core consumers; scope the override. rgba(15, 23, 42, 0.45)
--neu-shadow-lg Surface or overlay elevation Shared by other Core consumers; scope the override. 0 10px 30px rgba(15, 23, 42, 0.1), 0 4px 8px rgba(15, 23, 42, 0.04)
--neu-z-modal Inherited theme value used by this component Shared by other Core consumers; scope the override. 200