A react-native component library that implements the Fluent Design System.
Перейти к файлу
Saad Najmi 163defba33
Remove references to uifabricshared (#1342)
* repalce uses of uifabricshared

* Change files
2022-01-13 18:29:21 -06:00
.ado Add prettier check to pipeline (#1334) 2022-01-12 11:14:01 -08:00
.github Bug template fix (#1318) 2022-01-05 14:23:18 -08:00
.vscode Change port (#1256) 2021-12-15 14:07:39 -08:00
apps Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06:00
assets Ejlayne/fluentui tester docs (#473) 2020-09-22 13:03:15 -07:00
change Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06:00
docs Migration details from fluentui (#1250) 2022-01-06 11:41:13 -08:00
packages Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06:00
scripts Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06: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 Autolink Drawer Android Native Module to FURN Drawer (#1216) 2021-12-08 07:07:40 +09:00
.npmrc Prettier bump take 2 (#1015) 2021-09-21 11:55:23 -07:00
CODE_OF_CONDUCT.md Add a git attributes file for line ending settings (#180) 2020-04-24 11:38:36 -07:00
CONTRIBUTING.md Update Apple Native Module naming convention (MSF -> FRN) (#899) 2021-08-17 13:42:21 -04:00
LICENSE Add a git attributes file for line ending settings (#180) 2020-04-24 11:38:36 -07:00
PRINCIPLES.MD Create PRINCIPLES.MD (#696) 2021-05-21 16:47:39 -07:00
README.md Updating more broken links (#890) 2021-08-12 15:58:57 -05:00
beachball.config.js Get changelog for main fluentui/react-native package to have more detail (#1069) 2021-10-15 14:04:06 -07:00
lage.config.js Remove api extractor (#854) 2021-08-05 17:09:34 -07:00
lerna.json Remove docs from yarn and lerna workspace (#179) 2020-04-23 17:42:55 -07:00
package.json Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06:00
package.nuspec Use "FRN" prefix over "RCT" for macOS Callout native code (#1120) 2021-11-03 22:39:04 -05:00
prettier.config.js Integrate dependency checker into CI and fix dependency errors (#392) 2020-08-17 14:54:38 -07:00
tsconfig.json Remove references to uifabricshared (#1342) 2022-01-13 18:29:21 -06:00
yarn.lock Bump depcheck from 1.4.2 to 1.4.3 (#1330) 2022-01-14 00:26:37 +00:00

README.md

FluentUI React Native

npm version Build Status 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 + Lage

This repo is set up as a monorepo using Yarn workspaces. To install yarn, please follow instructions in the Yarn documentation.

For running tasks the repo has switched to using Lage for task running. The primary tasks that can be executed at the root are:

  • yarn build - does the typescript build for all packages in the repository
  • yarn test - will build, lint, and run any applicable tests on all packages in the repo
  • yarn bundle - will bundle all packages in the repo
  • yarn buildci - will build, lint, run tests, and bundle everything in the repo

Note that Lage uses caching to avoid redundant steps and has very minimal output. To avoid caching add --no-cache as a command line argument. Similarly adding --verbose will give more detailed output.

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.

Prettier

This repo is set up to run Prettier. To run Prettier in fix mode on the repo, run yarn prettier-fix at the root of the Repo.

If you are using VSCode as your editor, you can configure it to run Prettier on save. Prettier is a recommended extension for the repo. You can configure it to run by:

  1. Installing the Prettier extension for VSCode
  2. Going to Settings > Text Editor > Formatting > Check Format On Save

Contributing

Please visit our contribution guide for more information on contributing to this repo.

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.