Skip to content

A versatile and customizable React UI library designed to streamline the development of beautiful and responsive user interfaces.

License

Notifications You must be signed in to change notification settings

delab-team/de-ui

Repository files navigation

license mit typescript

A versatile and customizable React UI library designed to streamline the development of beautiful and responsive user interfaces. Packed with a rich set of components and themes, it empowers developers to create stunning web applications with ease.

Install

  • as local project package
yarn add @delab-team/de-ui

It is necessary to wrap your entire application within the AppInner component. Failure to do so may result in the application not working as expected. You also have the option to manually set the value to true in order to witness the application's outcome adorned with Telegram styles.

index.html

<script src="https://telegram.org/js/telegram-web-app.js"></script>

App.tsx

import { AppInner } from '@delab-team/de-ui' 
import { useEffect, useState } from 'react'

declare global {
    interface Window {
        Telegram?: any
    }
}

export const App: React.FC = () => {
    const [ firstRender, setFirstRender ] = useState<boolean>(false)
    const [ isTg, setIsTg ] = useState<boolean>(false)

    useEffect(() => {
      if (!firstRender) {
        setFirstRender(true)

        const isTgCheck = window.Telegram.WebApp.initData !== ''
        const TgObj = window.Telegram.WebApp

        setIsTg(isTgCheck)
        if (isTgCheck) {
            TgObj.ready()
            TgObj.enableClosingConfirmation()
            TgObj.expand()
        }
      }

    }, [ firstRender ])

    return (
      <AppInner isTg={isTg}>
            {/* Your application's goes here */}
      </AppInner>,
    )

}

Here's a list of components included in our library:

Modals:

Common:

Forms:

Headers

Icons:

Menu:

Wrappers:

Tables:

Typography:

License

MIT License Copyright (c) 2023 DeLab Team

About

A versatile and customizable React UI library designed to streamline the development of beautiful and responsive user interfaces.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published