PureScript bindings for React Native macOS with 55+ native AppKit components.
# Clone and install
git clone https://github.com/rowtype-yoga/purescript-yoga-react-native.git
cd purescript-yoga-react-native
bun install
cd example-macos && bun install && cd ..
# Install CocoaPods
cd example-macos/macos && bundle exec pod install && cd ../..
# Build PureScript
cd example-macos && bunx spago build && cd ..
# Run the example app
cd example-macos && npx react-native run-macosAdd to spago.yaml:
extraPackages:
yoga-react-native:
git: https://github.com/rowtype-yoga/purescript-yoga-react-native.git
ref: main
yoga-react:
git: https://github.com/rowtype-yoga/purescript-yoga-react.git
ref: mainimport Yoga.React.Native (text, tw, view)
import Yoga.React.Native.MacOS.Button (nativeButton)
import Yoga.React.Native.MacOS.Types as T
myButton = nativeButton
{ title: "Click me"
, bezelStyle: T.push
, onPress: handler_ doSomething
, style: Style.style { height: 24.0 }
}nativeButton nativeSwitch nativeSlider nativePopUp nativeComboBox nativeStepper nativeDatePicker nativeColorWell nativeCheckbox nativeRadioButton nativeSearchField nativeTokenField nativeSegmented
nativeTextField nativeTextEditor
nativeImage nativeAnimatedImage nativeVideoPlayer nativeLevelIndicator nativeProgress nativeSeparator nativePathControl
nativeBox nativeSplitView nativeTabView nativeScrollView sidebarLayout nativeToolbar nativeVisualEffect nativePatternBackground
macosAlert nativeSheet nativePopover nativeContextMenu macosShowMenu
nativeTableView nativeOutlineView
nativeDropZone nativeFilePicker
nativeMapView nativePDFView nativeWebView nativeCameraView nativeRiveView
copyToClipboard macosShare macosNotify macosPlaySound macosSetStatusBarItem macosQuickLook macosShowColorPanel macosShowFontPanel say
recognizeText (OCR) useSpeechRecognition detectLanguage analyzeSentiment tokenize
- macOS 14+
- Xcode 16+
- Node.js 20+ / Bun
- PureScript 0.15+ and Spago
- CocoaPods