Menu
React Figma LogoReact Figma
DocsGitHubBlog
🌜
🌞
React Figma LogoReact Figma
  • Docs
  • GitHub
  • Blog
  • Getting Started
    • Installation
    • Configuration
    • Running
    • HMR
    • React DevTools
  • Docs
    • API Overview
    • Architecture
    • Ecosystem
    • Roadmap
  • API
    • render(element, container)
    • Styling
    • Colors
    • Local Styles
    • Data Fetching
    • UI Primitives
      • View
      • Text
      • Image
      • StyleSheet
      • Platform
    • Figma components
      • Page
      • Frame
      • Component, Instance, createComponent
      • Svg
      • Ellipse
      • Group
      • Line
      • Rectangle
      • Star
      • Vector
      • Slice
    • React Native compatibility
      • Dimensions
      • Easing
      • useWindowDimensions
      • StatusBar

Platform

Analog of the Platform module at React Native, React Sketchapp.

API#

OS

Platform.OS returns "figma""

Version

Platform.Version returns 1

Platform.select

When given an object containing Platform.OS as keys, returns the value for the platform you are currently running on.

const value = Platform.select({
figma: () => ...
})
Previous
« StyleSheet
Next
Page »

Docs

  • Getting Started
  • API
  • Styling
  • Ecosystem

Social

  • GitHub Discussions
  • Twitter
  • LinkedIn
React Figma Logo
Copyright © 2021 Ilya Lesik