npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

b-toast-react

v0.1.0

Published

> Uma biblioteca de toasts para React

Readme

bToast - React

Uma biblioteca de toasts para React

O b-toast é uma biblioteca de toasts simples e personalizáveis para React. Ele fornece um componente React fácil de usar para exibir notificações no estilo toast em seu aplicativo.

Disponibilidades Atuais

O bToast está disponível para as seguintes plataformas:

Próximas Disponibilidades

Em breve, o bToast estará disponível para:

  • Angular
  • React Native

Recursos

  • Exibe notificações de estilo toast de forma simples e elegante.
  • Personalizável para atender às necessidades do seu aplicativo.
  • Suporte a tipos de toasts: sucesso, erro, aviso, informativo, etc.
  • Fácil integração com projetos React existentes.

NPM

https://www.npmjs.com/package/b-toast-react

Demonstração

Precisa de exemplos: DEMO PENDENTE

Instalação

$ npm install b-toast-react

Uso

Registro do plugin

Instancie o container b-toast-react globalmente em seu aplicativo React:

// main.js ou main.ts
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import { ToastContainer } from "b-toast-react";

const root = ReactDOM.createRoot(document.getElementById("root")!);
root.render(
  <React.StrictMode>
    <App />
    <ToastContainer />
  </React.StrictMode>
);

Em seguida, você pode usar o componente b-toast-react em qualquer lugar em seu aplicativo:

import { useToast } from "b-toast-react";
const toast = useToast();
toast.show("Olá sou um toast!");

// Ou com opções
const id = toast.show("Conteúdo do toast", {
  theme: "dark",
});
// Ao invocar o toast, é retornado um ID único que
// pode ser usado para removê-lo da tela, se necessário.

//Removendo todos os toasts
toast.clear();

//Removendo um dos toasts (por id)
toast.dismiss(id);

toast.show(conteudo,?props)

toast.clear()

toast.dismiss(id)

Props

Aqui estão as propriedades disponíveis para o componente b-toast:

| Atributo | Tipo | Inicial | Descrição | | :------- | :----: | :-------: | :------------------------------------------------------------------------------------------------------------------------------ | | content | String | -- | Define o conteúdo no toast. (requerido) | | type | String | success | Define o tipo de toast. Pode ser success, error, warning, info. | | title | String | -- | Inserir um titulo personalizado ao toast. | | duration | Number | 5000 | Define a duração em milissegundos que o toast ficará visível antes de ser fechado automaticamente. Padrão: 5000 (5 segundos). | | theme | String | light | Define o tema padrão do toast. Pode ser: dark, light. |

Design Baseado em Pine UI

O design deste projeto de toasts, b-toast, foi desenvolvido com base no Pine UI, um design system moderno e flexível para design de front-end. O Pine UI fornece um conjunto abrangente de componentes e estilos consistentes que ajudaram a moldar a aparência e a experiência do b-toast.

Para obter mais informações sobre o Pine UI, você pode visitar o Pine UI e explorar os recursos e a documentação fornecidos.

Licença

Este projeto está licenciado sob a MIT License.