Gathering detailed insights and metrics for burnt
Gathering detailed insights and metrics for burnt
Gathering detailed insights and metrics for burnt
Gathering detailed insights and metrics for burnt
jp.keijiro.bibcam
Burnt-in barcode metadata camera
calories-burnt
Calculate the number of calories burnt from a run.
timecodejs
Optical Recognition for burnt-in timecode in video
@burnt-labs/abstraxion
The `abstraxion` library is an account abstraction solution tailored for the XION chain. It offers a clean and streamlined way to create abstract accounts, sign transactions, integrating seamlessly with [graz](https://github.com/graz-sh/graz), to addition
npm install burnt
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,220 Stars
119 Commits
38 Forks
4 Watching
1 Branches
10 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
Java (28.02%)
TypeScript (24.07%)
C++ (11.74%)
Objective-C++ (10.56%)
Swift (9.11%)
Ruby (5.14%)
JavaScript (3.81%)
Kotlin (3.36%)
Starlark (3.11%)
Objective-C (0.63%)
CMake (0.44%)
Cumulative downloads
Total Downloads
Last day
-7.1%
5,033
Compared to previous day
Last week
1.4%
27,683
Compared to previous week
Last month
0.8%
118,851
Compared to previous month
Last year
198.5%
1,036,841
Compared to previous year
2
3
4
Cross-platform toasts for React Native, powered by native elements.
Now with Android, iOS & Web Support.
See this Twitter thread.
This is a library with a toast
and alert
method for showing ephemeral UI.
On iOS, it wraps SPIndicator
and
AlertKit
.
On Android, it wraps ToastAndroid
from react-native
. Burnt.alert()
falls
back to Burnt.toast()
on Android. This may change in a future version.
On Web, it wraps sonner
by Emil
Kowalski.
Burnt works with both the old & new architectures. It's built on top of JSI, thanks to Expo's new module system.
toast
that uses native components under the hood,
rather than using React state with JS-based UI.alert
popupsDisplaying toasts on top of modals has always been an issue in React Native. With Burnt, this works out of the box.
1import * as Burnt from "burnt"; 2 3Burnt.toast({ 4 title: "Burnt installed.", 5 preset: "done", 6 message: "See your downloads.", 7});
You can also Burnt.alert()
and Burnt.dismissAllAlerts()
.
1yarn add burnt
Burnt likely requires Expo SDK 46+.
1npx expo install burnt expo-build-properties
Add the expo-build-properties
plugin to your app.json
/app.config.js
,
setting the deployment target to 13.0
(or higher):
1export default { 2 plugins: [ 3 [ 4 "expo-build-properties", 5 { 6 ios: { 7 deploymentTarget: "13.0", 8 }, 9 }, 10 ], 11 ], 12};
Then, you'll need to rebuild your dev client. Burnt will not work in Expo Go.
1npx expo prebuild --clean 2npx expo run:ios
The config plugin ensures that your iOS app has at least iOS 13 as a deployment target, which is required for Burnt (as well as Expo SDK 47+).
To enable Web support, you need to add the <Toaster />
to the root of your
app. If you're using Next.js, add this into your _app.tsx
component.
1// _app.tsx 2import { Toaster } from "burnt/web"; 3 4function MyApp({ Component, pageProps }) { 5 return ( 6 <> 7 <Component {...pageProps} /> 8 <Toaster position='bottom-right' /> 9 </> 10 ); 11}
If you're using Next.js, add burnt
to your transpilePackages
in next.config.js
.
1/** @type {import('next').NextConfig} */ 2const nextConfig = { 3 transpilePackages: [ 4 // Your other packages here 5 "burnt" 6 ] 7}
To configure your Toaster
, please reference the sonner
docs.
If you're using Expo Web, you'll need to add the following to your
metro.config.js
file:
1// Learn more https://docs.expo.io/guides/customizing-metro 2const { getDefaultConfig } = require("expo/metro-config"); 3 4const config = getDefaultConfig(__dirname); 5 6// --- burnt --- 7config.resolver.sourceExts.push("mjs"); 8config.resolver.sourceExts.push("cjs"); 9// --- end burnt --- 10 11module.exports = config;
1pod install
1cd applications/app 2expo install burnt expo-build-properties 3npx expo prebuild --clean 4npx expo run:ios 5cd ../.. 6yarn
Be sure to also follow the expo instructions and web instructions.
toast
toast(options): Promise<void>
1Burnt.toast({ 2 title: "Congrats!", // required 3 4 preset: "done", // or "error", "none", "custom" 5 6 message: "", // optional 7 8 haptic: "none", // or "success", "warning", "error" 9 10 duration: 2, // duration in seconds 11 12 shouldDismissByDrag: true, 13 14 from: "bottom", // "top" or "bottom" 15 16 // optionally customize layout 17 layout: { 18 iconSize: { 19 height: 24, 20 width: 24, 21 }, 22 }, 23 icon: { 24 ios: { 25 // SF Symbol. For a full list, see https://developer.apple.com/sf-symbols/. 26 name: "checkmark.seal", 27 color: "#1D9BF0", 28 }, 29 web: <Icon />, 30 }, 31});
alert
The API changed since recording this video. It now uses object syntax.
alert(options): Promise<void>
1import * as Burnt from "burnt"; 2 3export const alert = () => { 4 Burnt.alert({ 5 title: "Congrats!", // required 6 7 preset: "done", // or "error", "heart", "custom" 8 9 message: "", // optional 10 11 duration: 2, // duration in seconds 12 13 // optionally customize layout 14 layout: { 15 iconSize: { 16 height: 24, 17 width: 24, 18 }, 19 }, 20 icon: { 21 ios: { 22 // SF Symbol. For a full list, see https://developer.apple.com/sf-symbols/. 23 name: "checkmark.seal", 24 color: "#1D9BF0", 25 }, 26 web: <Icon />, 27 }, 28 }); 29};
On Web, this will display a regular toast. This may change in the future.
dismissAllAlerts()
Does what you think it does! In the future, I'll allow async spinners for promises, and it'll be useful then.
1yarn build 2cd example 3yarn 4npx expo run:ios # do this again whenever you change native code
You can edit the iOS files in ios/
, and then update the JS accordingly in
src
.
Special thanks to Tomasz Sapeta for offering help along the way.
Expo Modules made this so easy to build, and all with Swift – no Objective C. It's my first time writing Swift, and it was truly a breeze.
No vulnerabilities found.
No security vulnerabilities found.