Sheet

A secondary task in a native sheet with detents.

  • Native presentation
  • Liquid Glass on iOS 26
  • In the first release
import { Sheet, sheetPrimitive } from "nitro-ui-sdk/sheet";
HeroUI Native
BottomSheet
Expo UI
BottomSheetModalBottomSheet
  • Sheet example screen, light appearance
    Light
  • Sheet example screen, dark appearance
    Dark
  • Sheet example screen, liquid glass appearance
    Liquid Glass
On this page

Sheet opens a native modal route with one or more heights. Use it for a secondary task with its own controls. Short confirmations fit in Dialog.

Anatomy

import { Sheet } from "nitro-ui-sdk/sheet";

<Sheet.Root label="Edit draft" title="Draft details" closeLabel="Close" route={{ open() {}, close() {} }}>
  <Sheet.Trigger />
  <Sheet.Content>
    <Sheet.Handle />
    <Sheet.Title />
    <Sheet.Footer><Sheet.Close /></Sheet.Footer>
  </Sheet.Content>
</Sheet.Root>;
Part Description
Root Shares state across the presenting and presented routes.
Trigger Named opening button on the presenting route.
Content Hosts the presented body and scopes its agent controls.
Handle Decorative grabber.
Title Heading for the presented task.
Footer Layout container for closing controls.
Close Named button that closes the route.

Usage

import { createStackNavigator, NavigationContainer } from "nitro-ui-navigation";
import { Sheet, sheetRouteOptions } from "nitro-ui-sdk/sheet";

const Stack = createStackNavigator<{ Home: undefined; Details: undefined }>();

export function DraftDetails() {
  const route = { open: () => open(), close: () => close() };
  let open = () => {};
  let close = () => {};
  return (
    <Sheet.Root label="Edit draft" title="Draft details" closeLabel="Close" route={route}>
      <NavigationContainer>
        <Stack.Navigator>
          <Stack.Screen name="Home">
            {({ navigation }) => {
              open = () => navigation.navigate("Details");
              close = () => navigation.pop();
              return <Sheet.Trigger />;
            }}
          </Stack.Screen>
          <Stack.Screen name="Details" options={sheetRouteOptions({ variant: "half" })}>
            {() => <Sheet.Content><Sheet.Title /><Sheet.Close /></Sheet.Content>}
          </Stack.Screen>
        </Stack.Navigator>
      </NavigationContainer>
    </Sheet.Root>
  );
}

Variants and sizes

sheetRouteOptions supports half, full and stepped. A stepped sheet accepts one to three strictly increasing fractions above zero and up to one. The initial detent is a zero-based index or last. Sizing follows the route’s options.

States

Set disabled to prevent opening. A presented task can still close. Swiping the sheet away requests a change from the user source.

Controlled

Use value with onValueChange to own visibility, or defaultValue for initial uncontrolled visibility. The owner can decline using details.preventDefault(). A controlled value that remains true can present the route again after native dismissal.

Liquid Glass

The trigger and decorative Handle use MaterialView. They fall back to opaque token fills. The route body uses an opaque surface for legibility.

Props

Root

Prop Type Default Description
route { open(): void, close(): void } required Callbacks that present and pop the modal route.
label string required Trigger name.
title string required Task heading.
closeLabel string required Dismiss button name.
value / defaultValue boolean false Controlled or initial visibility.
onValueChange (open, details) => void — Visibility request with source.
disabled boolean false Blocks opening.
variant SheetPresentation[“variant”] half Variant sent to style resolvers. Configure the route options separately.
styles SheetStyles — Part style resolvers.
api Controller — Controller binding.
agentId string — Stable agent identity.
children ReactNode required Navigator or routes containing the parts.

Trigger, Title, Close

Prop Type Default Description
part SheetPart component part Style part to resolve.
children string matching Root text Override visible label or title.
Prop Type Default Description
part SheetPart component part Style part to resolve.
children ReactNode required Presented content or action controls.

Handle

Prop Type Default Description
part SheetPart handle Style part to resolve.

Controller API

Create a binding with sheetPrimitive.createApi() and pass it to Sheet.Root as api. Read the mounted handlers from api.current.

Action Signature Result
open (source?) => ChangeStatus Requests presentation.
close (source?) => ChangeStatus Requests dismissal.

Styles

import { Sheet } from "nitro-ui-sdk/sheet";

<Sheet.Root label="Edit draft" title="Draft details" closeLabel="Close" route={{ open() {}, close() {} }}
  styles={{ content: ({ tokens }) => ({ layout: { padding: tokens.spacing.xxl } }) }}>
  <Sheet.Trigger />
</Sheet.Root>;

Resolvers receive tokens, the variant, system size, and open and disabled state fields.

Accessibility

Trigger and Close are named buttons. Title is a heading. The native route owns gestures, foreground focus and detent changes. Keep an accessible close control in the presented route.

Agent API

Action Arguments Notes
open None Opens from the trigger.
close None Closes from the foreground presentation or its Close button.

Platform notes

iOS Android
Implementation NitroUI Navigation modal route and native detents. NitroUI Navigation modal route with platform-defined behavior.
Verification iOS harness. Build and runtime verification require an Android NDK.