Skip to content

solid-component/solid-hot-toast

Repository files navigation

solid-hot-toast

Solid Toast Component

Install

solid-hot-toast

Usage

Include the default styling and then:

import { render } from "solid-js/web";
import { toast, create, Toast, Toaster } from "solid-hot-toast";

const toastValue = create({
    limit: 3
})

render(
  () => (
    <>
      <ToastProvider {...toastValue}>
        <Toaster position={() => "top-center"}/>
      </Trigger>
      <Toaster position={() => "top-right"}/>
      <div onClick={() => toastValue.toast("open")}>click</div>
      <div onClick={() => toast("open")}>click1</div>
    </div>
  ),
  document.getElementById("app")
);

Documentation

Find the full API reference on official documentation.

solid-hot-toast is released under the MIT license.

About

hot-toast for solidjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published