npm

@melio-ui/dialog
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Dialog

기본

<Dialog.Root>
  <Dialog.Trigger asChild>
    <button type="button">Open Dialog</button>
  </Dialog.Trigger>
  <Dialog.Portal>
    <Dialog.Backdrop />
    <Dialog.Content>
      <Dialog.Close asChild>
        <button type="button">X</button>
      </Dialog.Close>
      <div>Dialog Content</div>
      <div>
        <Dialog.Close asChild>
          <button type="button">닫기</button>
        </Dialog.Close>
      </div>
    </Dialog.Content>
  </Dialog.Portal>
</Dialog.Root>

Backdrop

<Dialog.Root>
  <Dialog.Trigger asChild>
    <button type="button">Open Dialog</button>
  </Dialog.Trigger>
  <Dialog.Portal>
    <Dialog.Backdrop backdrop />
    <Dialog.Content>
      <Dialog.Close asChild>
        <button type="button">X</button>
      </Dialog.Close>
      <div>Dialog Content</div>
      <div>
        <Dialog.Close asChild>
          <button type="button">닫기</button>
        </Dialog.Close>
      </div>
    </Dialog.Content>
  </Dialog.Portal>
</Dialog.Root>

DestroyOnClose

<Dialog.Root>
  <Dialog.Trigger asChild>
    <button type="button">Open Dialog</button>
  </Dialog.Trigger>
  <Dialog.Portal>
    <Dialog.Backdrop />
    <Dialog.Content destroyOnClose={false}>
      <Dialog.Close asChild>
        <button type="button">X</button>
      </Dialog.Close>
      <div>Dialog Content</div>
      <div>
        <Dialog.Close asChild>
          <button type="button">닫기</button>
        </Dialog.Close>
      </div>
    </Dialog.Content>
  </Dialog.Portal>
</Dialog.Root>

ForceMount

<Dialog.Root>
  <Dialog.Trigger asChild>
    <button type="button">Open Dialog</button>
  </Dialog.Trigger>
  <Dialog.Portal>
    <Dialog.Backdrop />
    <Dialog.Content forceMount>
      <Dialog.Close asChild>
        <button type="button">X</button>
      </Dialog.Close>
      <div>Dialog Content</div>
      <div>
        <Dialog.Close asChild>
          <button type="button">닫기</button>
        </Dialog.Close>
      </div>
    </Dialog.Content>
  </Dialog.Portal>
</Dialog.Root>

Readme

Keywords

none

Package Sidebar

Install

npm i @melio-ui/dialog

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

66.3 kB

Total Files

9

Last publish

Collaborators

  • elle510