0.2.0 ā€¢ Published 1 year ago

react-sweetify v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React-Sweetify

React-Sweetify is a lightweight and customizable modal library built for React applications. It allows you to create modals and pop-ups easily and quickly with flexible options for customization.

Installation

npm

npm install react-sweetify

yarn

yarn add react-sweetify

pnpm

pnpm install react-sweetify

Usage

import React from 'react';
import Sweetify from 'react-sweetify';

function App() {
  return (
    <Sweetify>
      <h1>Hello World!</h1>
    </Sweetify>
  );
}

Available props

šŸ‘‡

NameTypeDefaultDescription
buttonTextstringOpen ModalThis is the text that appears on the button that opens the modal
classNamestringAdd a className to the component content.
fullscreenBelowsmmdlgxlBreakpoint below which the modal will take up the full screen.
optionsobjectThis is an object containing additional options for the modal, including the position of the modal on the screen and the width of the modal content.

Frequently Asked Questions

šŸ‘‰ How do I change the position of the modal?

To change the position of the modal, you can use the options prop and set the position property to one of the following values:

For example:

<Sweetify
  options={{
    position: "middle-center"
  }}
>
  <h1>Hello World</h1>
</Sweetify>

šŸ‘‰ How do I change the width of the modal?

To change the width of the modal, you can use the options prop and set the width property to one of the following values:

For example:

<Sweetify
  options={{
    width: "sm"
  }}
>
  <h1>Hello World</h1>
</Sweetify>
0.2.0

1 year ago

0.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago