ckstn0777 / chan-ui

디지인 시스템 + 라이브러리 만들어보기

Home Page:http://ckstn0777.github.io/chan-ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chan-ui

install

To install chan-ui in an existing project as a dependency:

Install with npm:

npm i @ckstn0777/chan-ui

Install with yarn:

yarn add @ckstn0777/chan-ui

Setting

Provide the client to your App. A good place to put this is in your root component:

function App() {
  return (
    <ChanProvider initialTheme="wjtb" initialMode="default">
      ...
    </ChanProvider>
  )
}
  • initialTheme: 'velo' | 'wjtb' (default: 'wjtb')
  • initialMode: 'light' | 'dark' | 'default' (default: 'default')

Usage

Here's an example of basic usage:

import { Button } from '@ckstn0777/chan-ui'

function Home() {
  return (
    <div>
      <Button>버튼</Button>
    </div>
  )
}

You can toggle light, dark mode:


About

디지인 시스템 + 라이브러리 만들어보기

http://ckstn0777.github.io/chan-ui/


Languages

Language:TypeScript 79.1%Language:HTML 9.4%Language:JavaScript 8.4%Language:CSS 3.1%