Skip to content

Appearance & styles ​

Two props control the look:

  • appearance: the surface (fill, corners, border, shadow, backdrop, handle, width). Drawn natively.
  • styles: React Native styles for the parts rendered in JavaScript (your content wrapper, alert title, buttons).
tsx
sheet.present({
  id: 'styled',
  content: <Content />,
  snapPoints: ['50%', '90%'],
  appearance: {
    backgroundColor: '#FFF8F0',
    cornerRadius: 28,
    borderWidth: 1,
    borderColor: '#E0B98F',
    shadowRadius: 16,
    shadowOpacity: 0.25,
    backdropColor: '#000000',
    backdropOpacity: 0.5,
    showHandle: true,
    handleColor: '#C2703D',
  },
  styles: {
    contentStyle: {padding: 20, gap: 12},
  },
});

appearance (surface design) ​

PropTypeDefaultiOSAndroidWeb
backgroundColorhexsystem background / white✅✅✅
cornerRadiusnumber ≥ 016✅ iOS 16+✅✅
borderWidthnumber ≥ 00✅✅✅
borderColorhex—✅✅✅
shadowRadiusnumber ≥ 00✅—✅
shadowOpacity0–10✅—✅
backdropOpacity0–10.4system✅✅
backdropColorhexblacksystem—✅
showHandlebooleantrue✅—✅ bottom sheets
handleColorhexsystem grey——✅
widthnumber > 0automatic——✅

"—" means the value is accepted and stored but not drawn on that platform yet. "system" means the platform's own backdrop is used.

Colours ​

Colours must be hex with 6 or 8 digits: #RRGGBB or #RRGGBBAA.

tsx
appearance: {backgroundColor: '#FFFFFFCC'} // white at 80% opacity

Named colours ('white'), rgb() and 3-digit hex are rejected: present() returns invalid-config instead of guessing.

Validation ​

RuleProps
Hex colourbackgroundColor, backdropColor, handleColor, borderColor
≥ 0cornerRadius, borderWidth, shadowRadius
0–1backdropOpacity, shadowOpacity
> 0width

styles (content design) ​

Any React Native style, applied to the parts rendered in JavaScript.

PropApplies to
contentStyleThe view wrapping your content (padding, gap, background, flex…)
titleStyleAlert title
messageStyleAlert message, toast text
buttonStyleAlert buttons
buttonTextStyleAlert button text
tsx
styles: {
  contentStyle: {paddingHorizontal: 24, paddingBottom: 32},
}

The content wrapper has flex: 1 by default, so contentStyle is the place for padding rather than an extra wrapping View.

Theming ​

There is no theme provider; build the props from your own theme:

tsx
function useSheetAppearance(): SheetAppearance {
  const dark = useColorScheme() === 'dark';
  return dark
    ? {backgroundColor: '#1C1C1E', handleColor: '#48484A', borderColor: '#2C2C2E', borderWidth: 1}
    : {backgroundColor: '#FFFFFF', handleColor: '#C7C7CC'};
}

const appearance = useSheetAppearance();
sheet.present({id: 'x', content: <X />, appearance});

For named sheets, put the shared appearance in each registry definition.

Released under the MIT License.