1.1.1 • Published 2 months ago

useui-ts v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

image

Introduction

useUI is a React library offering a suite of components and hooks that simplify app development. Access to components is provided through hooks, enabling the encapsulation of complex logic and state management internally, without dictating their appearance. This approach grants developers the freedom to style, while still providing a robust and flexible functionality for creating unique user interfaces 😎.

Available Hooks

  • useModal
  • useToast

Usage example

import { useModal, useButton, Modal } from 'useui-ts'

function Component() {
  const modal = useModal();

  return (
    <div>
      <button onClick={() => modal.open("first-modal", {
        size: "sm",
        title: "Are you sure?",
        content: (
          <div>
            Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt
            nulla rerum voluptatibus provident deserunt.
          </div>
        ),
        bottomNavigationBar: {
          justifyBetween: true,
          items: [
            <ConfirmButton {...confirmProps}>Send</SendButton>,
            <CancelButton onClick={() => modal.close("first-modal")}>Cancel</button>,
          ],
        },
      })}>Open Modal</button>
    </div>
  )
}

// Insert Modal component in App component
function App() {
  return (
    <div>
      <Modal />
    </div>
  )
}

Installation

npm install --save useui-ts
1.1.1

2 months ago

1.1.0-alpha.5

2 months ago

1.1.0-alpha.3

2 months ago

1.1.0-alpha.4

2 months ago

1.1.0-alpha.2

2 months ago

1.0.1-alpha.0

3 months ago

1.4.0

3 months ago

1.2.0

3 months ago

1.0.2

3 months ago

1.1.0

3 months ago

1.3.7

3 months ago

1.2.8

3 months ago

1.3.6

3 months ago

1.2.7

3 months ago

1.3.5

3 months ago

1.2.6

3 months ago

1.3.4

3 months ago

1.3.3

3 months ago

1.2.4

3 months ago

1.3.2

3 months ago

1.2.3

3 months ago

1.3.1

3 months ago

1.2.2

3 months ago

1.3.0

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago

0.3.0

3 months ago

0.3.6

3 months ago

0.3.5

3 months ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.4

3 months ago

0.3.3

3 months ago

0.2.0

3 months ago

0.1.9

3 months ago

0.1.8

3 months ago

0.1.7

3 months ago

0.1.6

3 months ago

0.1.5

3 months ago

0.1.4

3 months ago

0.1.3

3 months ago

0.1.2

3 months ago

0.1.1

3 months ago