cf-ui

Cloudflare UI框架。(:gem: Cloudflare UI Framework)

  • 所有者: cloudflare/cf-ui
  • 平台: Linux, Mac, Windows
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

cf-ui (not maintained)


This repository is no longer maintained. We decided to merge cf-ui into our internal monorepo and we will keep the future development there. We do not accept pull requests here. However, we plan to synchronize our internal changes with this repository.


Build Status

Cloudflare UI Framework

cf-ui is a set of over 50 packages used to build UIs at Cloudflare using
projects such as React,
Fela, Lerna and more.

Usage

Whilst cf-ui is used extensively within Cloudflare, it is also an evolving set of components and therefore can be unstable. We recommend only using this toolset to build interfaces for Cloudflare-internal products. However, feel free to follow along and contribute as we continue to grow this library.

cf-ui meets CSS in JS

We are currently migrating cf-ui to CSS in JS powered by Fela. That means that our components include styles written in JavaScript and you can use them out of the box! However, you need to start using Fela in your project. Follow our migration here.

Getting Started

To view all of the available components and packages, see the packages/ directory. Do you want to see examples? Check out our documentation.

CSS in JS setup

cf-ui components expect that there is Fela Renderer in the context of your React app. It's the way how to render styles that come with our components into the <style></style> node. You have to use Fela in your project if you want to use cf-ui. Here's the code example how:

import React from 'react';
import ReactDOM from 'react-dom';
import { StyleProvider } from 'cf-style-provider';
import { Button } from 'cf-component-button';

ReactDOM.render(
  <StyleProvider>
    <Button type="primary" onClick={() => console.log('clicked')}>
      Primary Button
    </Button>
  </StyleProvider>,
  document.getElementById('react-app')
);

Do you want to try for yourself?

git clone git@github.com:cloudflare/cf-ui.git
cd cf-ui/packages/example
npm install
npm run build
open index.html

Contributing

To get started contributing please see CONTRIBUTING.md

License

cf-ui is BSD Licensed

主要指標

概覽
名稱與所有者cloudflare/cf-ui
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台Linux, Mac, Windows
許可證Other
所有者活动
創建於2016-06-09 14:05:46
推送於2019-04-14 22:52:40
最后一次提交2017-09-25 12:39:02
發布數1008
最新版本名稱cf-component-card@3.1.0 (發布於 2017-09-21 10:39:50)
第一版名稱cf-component-button@2.1.0 (發布於 )
用户参与
星數1.3k
關注者數32
派生數81
提交數884
已啟用問題?
問題數101
打開的問題數1
拉請求數248
打開的拉請求數1
關閉的拉請求數33
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?