Skip to content

Instantly share code, notes, and snippets.

@TowhidKashem
TowhidKashem / gist:ab2bf90e9111fcccf9aaf565143caad3
Created April 2, 2026 16:52
Sonner native patch to make it as wide as the inner contents
# Makes toasts as wide as their inner content, otherwise they span the full width of the screen.
diff --git a/node_modules/sonner-native/.bun-tag-478b337b96d2cca6 b/node_modules/sonner-native/.bun-tag-478b337b96d2cca6
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/sonner-native/lib/module/toast.js b/node_modules/sonner-native/lib/module/toast.js
index 2947986..ff3b311 100644
--- a/node_modules/sonner-native/lib/module/toast.js
+++ b/node_modules/sonner-native/lib/module/toast.js
@@ -307,7 +307,7 @@ export const Toast = /*#__PURE__*/React.forwardRef(({
watchman watch-del-all && rm -rf /tmp/metro-* && yarn cache clean && rm yarn.lock && rm -rf node_modules/ && yarn install && expo r -c