💎 Cloudflare UI Framework
Switch branches/tags
example@1.0.24 example@1.0.23 example@1.0.22 example@1.0.21 example@1.0.20 example@1.0.19 example@1.0.18 example@1.0.17 example@1.0.16 example@1.0.15 example@1.0.14 example@1.0.13 example@1.0.11 example@1.0.10 example@1.0.8 example@1.0.7 example@1.0.6 example@1.0.5 example@1.0.4 example@1.0.3 example@1.0.2 example@1.0.1 cf-util-text@2.2.0 cf-util-text@2.0.1 cf-util-text@2.0.0 cf-util-text@1.0.0 cf-util-route-handler@4.2.0 cf-util-route-handler@4.0.1 cf-util-route-handler@4.0.0 cf-util-route-handler@3.0.0 cf-util-route-handler@2.0.3 cf-util-route-handler@2.0.2 cf-util-route-handler@2.0.1 cf-util-route-handler@2.0.0 cf-util-markdown@3.2.0 cf-util-markdown@3.0.0 cf-util-markdown@2.0.0 cf-util-markdown@1.0.3 cf-util-markdown@1.0.2 cf-util-markdown@1.0.1 cf-util-logger@2.2.0 cf-util-logger@2.0.0 cf-util-logger@1.0.3 cf-util-logger@1.0.2 cf-util-logger@1.0.1 cf-util-http@4.0.5 cf-util-http@4.0.3 cf-util-http@4.0.1 cf-util-http@4.0.0 cf-util-http@3.7.1 cf-util-http@3.6.1 cf-util-http@3.6.0 cf-util-http@3.5.10 cf-util-http@3.5.9 cf-util-http@3.5.8 cf-util-http@3.5.7 cf-util-http@3.5.6 cf-util-http@3.5.5 cf-util-http@3.5.4 cf-util-http@3.5.3 cf-util-http@3.5.2 cf-util-http@3.5.1 cf-util-http@3.5.0 cf-util-http@3.3.0 cf-util-http@3.2.0 cf-util-http@3.0.1 cf-util-http@3.0.0 cf-util-http@2.0.1 cf-util-http@2.0.0 cf-util-http@1.2.4 cf-util-http@1.2.3 cf-util-http@1.2.2 cf-util-http@1.2.1 cf-util-http-poll@2.7.7 cf-util-http-poll@2.7.5 cf-util-http-poll@2.7.3 cf-util-http-poll@2.7.2 cf-util-http-poll@2.7.1 cf-util-http-poll@2.6.1 cf-util-http-poll@2.6.0 cf-util-http-poll@2.5.10 cf-util-http-poll@2.5.9 cf-util-http-poll@2.5.8 cf-util-http-poll@2.5.7 cf-util-http-poll@2.5.6 cf-util-http-poll@2.5.5 cf-util-http-poll@2.5.4 cf-util-http-poll@2.5.3 cf-util-http-poll@2.5.2 cf-util-http-poll@2.5.1 cf-util-http-poll@2.5.0 cf-util-http-poll@2.3.0 cf-util-http-poll@2.2.0 cf-util-http-poll@2.0.1 cf-util-http-poll@2.0.0 cf-util-http-poll@1.0.6 cf-util-http-poll@1.0.5 cf-util-http-poll@1.0.4 cf-util-http-poll@1.0.3 cf-util-http-poll@1.0.2
Nothing to show
Clone or download

README.md

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