Ontwik UI

Getting Started

Installation

Inside your React project directory, run the following:

yarn add ontwik-ui

Or with npm:

npm install ontwik-ui

Ontwik provider

You have to wrap your app with Ontwik Provider:

import { OntwikProvider, Typography } from 'ontwik-ui';
 
const YourApp = () => (
  <OntwikProvider>
    <Typography variant="title">Hello world</Typography>
  </OntwikProvider>
);
💡

If you want to use your own custom theme, you can pass it as a prop and it will override the default one. See theme structure here for more insights.

I'm planning to build a CLI to generate the theme for you.

import theme from 'theme';
import { OntwikProvider, Typography } from 'ontwik-ui';
 
const YourApp = () => (
  <OntwikProvider theme={theme}>
    <Typography variant="title">Hello world</Typography>
  </OntwikProvider>
);

Storybook

Storybook

Last updated on August 23, 2022