A react-native component library that implements the Fluent Design System.
Перейти к файлу
Samuel Freiberg 926d04089d
Better clarify prerequisites in README's (#338)
* Yarn

* Improve Prerequisites section for ReadMe's

* Adding development environmental link
2020-07-16 15:17:28 -07:00
.ado Fix macOS test app (#328) 2020-07-13 13:15:54 -07:00
.github Update dependabot.yml (#261) 2020-06-11 17:41:36 -07:00
.vscode Make breakpoints work when doing direct debugging (#142) 2020-03-30 09:03:03 -07:00
apps Better clarify prerequisites in README's (#338) 2020-07-16 15:17:28 -07:00
assets Enhance E2E Reporting + CI Reliability (#325) 2020-07-10 11:51:09 -07:00
change Set Focus props during initial render to avoid shifting other components (#339) 2020-07-16 14:25:34 -07:00
packages Set Focus props during initial render to avoid shifting other components (#339) 2020-07-16 14:25:34 -07:00
scripts Web Tester (#282) 2020-07-02 13:56:34 -07:00
test-projects 📦 applying package updates ***NO_CI*** 2020-07-04 06:24:16 +00:00
.dockerignore Initial scaffolding (#1) 2019-08-02 09:28:49 -07:00
.eslintignore Initial scaffolding (#1) 2019-08-02 09:28:49 -07:00
.eslintrc.json Add Android button to expo playground 2019-12-17 14:15:46 -08:00
.gitattributes Add a git attributes file for line ending settings (#180) 2020-04-24 11:38:36 -07:00
.gitignore Enhance E2E Reporting + CI Reliability (#325) 2020-07-10 11:51:09 -07:00
CODE_OF_CONDUCT.md Add a git attributes file for line ending settings (#180) 2020-04-24 11:38:36 -07:00
LICENSE Add a git attributes file for line ending settings (#180) 2020-04-24 11:38:36 -07:00
README.md Better clarify prerequisites in README's (#338) 2020-07-16 15:17:28 -07:00
api-extractor.json Move api-extractor and tsconfig to shared folder 2020-03-25 13:23:14 -07:00
beachball.config.js Update to new version of beachball with working prepublish hook (#167) 2020-04-20 10:58:02 -07:00
lerna.json Remove docs from yarn and lerna workspace (#179) 2020-04-23 17:42:55 -07:00
package.json Web Tester (#282) 2020-07-02 13:56:34 -07:00
prettier.config.js Initial scaffolding (#1) 2019-08-02 09:28:49 -07:00
tsconfig.json Move api-extractor and tsconfig to shared folder 2020-03-25 13:23:14 -07:00
yarn.lock Migrate macOS test app to react-native-test-app (#331) 2020-07-14 10:30:44 -07:00

README.md

FluentUI React Native

npm version Build Status

FluentUI React Native is a javascript component library that provides developers with controls that are part of the Fluent Design System. These controls are built on React Native and fully customizable.

FluentUI React Native is still in the alpha stages of development for both the components and the repo. We encourage anyone who is interested in getting an early glimpse of our plans to download and use our components, but please note that you may hit bumps along the way. Please leave us feedback or file issues if you run into bumps, and we will continue to improve the quality of the repo.

Development status on each platform:

Windows macOS iOS Android
Alpha (in progress) Alpha (in progress) Alpha (in progress) Coming Soon

Getting Started

If you have an existing React Native project, it's easy to begin using FluentUI React Native. If you need to setup a new React Native project, please see the React Native Windows Getting Started documentation.

Prerequisites

Create New React Native project (if needed)

  1. Follow the instructions on the React Native Windows Getting Started documentation to create a React Native project.

  2. Navigate to the root folder of your project, and use npm to install the package:

 npm i @fluentui/react-native
  1. After successful installation, you can test the package by importing components at the top of your app's entry file, e.g. App.js:
 import { Checkbox } from '@fluentui/react-native';
  1. After importing the @fluentui/react-native package, you can use components such as Text and Checkbox in your JSX.
// In App.js in a new project
import React from 'react';
import { View, Text } from 'react-native';
import { Checkbox } from '@fluentui/react-native';
function HelloWorldApp() {
  return (
    <View
      style={{
        flex: 1,
        justifyContent: "center",
        alignItems: "center"
      }}>
      <Text>Hello, world!</Text>
      <Checkbox label="Hello World Checkbox"/>
    </View>
  )
}
export default HelloWorldApp;

Documentation

Components and Controls

Our component documentation is hosted on the FluentUI documentation.

Expanding Component documentation

The FluentUI website is built out of the FluentUI repository. React-Native components and controls are documented in a 'cross' (cross-platform) directory in each component page directory, e.g. Button 'cross' directory. The FluentUI website can be run locally to verify changes, and should reflect the current state of controls that have established the v1 set of properties on any one platform.

Since the FluentUI React Native controls are cross-platform, but represented by a single page, it's important to distinguish platform differences and limitations. Examples include:

  • If the component is not available on all supported platforms.
  • If the component has properties not available on all supported platforms.
  • If the component has limited support for a given property on any supported platforms.
  • If the component has distinguishable behavior on a supported platform that must be minded while used.

Theming framework

Our FluentUI framework documentation is found in this repository alongside the implementation.

Developing in the repo

Yarn + Lerna

This repo is set up as a monorepo using Lerna + Yarn workspaces. The yarn commands will trigger the lerna commands which will execute yarn commands in each package. To install yarn, please follow instructions in the Yarn documentation.

Setup your development environment

To start developing in the repository you can:

  1. git clone https://github.com/microsoft/fluentui-react-native.git
  2. cd fluentui-react-native
  3. yarn
  4. yarn build

After a successful yarn build, you can explore FluentUI Tester, our demo application to play with each of the controls. To run FluentUI Tester, please follow instructions in the FluentUI Tester readme.

Beachball

This repo manages semantic versioning and publishing using Beachball. When contributing, make sure to run the following before making a pull request:

  1. yarn change will take you through a command line wizard to generate change files
  2. Make sure to commit and push the newly generated change file

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.