@patternfly/pfe-toast
Advanced tools
Weekly downloads
Readme
pfe-toast
is a self-contained alert that is hidden on page load and slides in/out of the view when programmatically opened/closed.
<pfe-toast>
<p>You've been successfully toasted!</p>
</pfe-toast>
The default slot can contain any type of content.
auto-dismiss
: This is an optional attribute string that you can provide to automatically dismiss the alert. The auto-dismiss delay value can be provided in seconds or in milliseconds. For example, auto-dismiss="3s"
and auto-dismiss="3000ms"
will dismiss the toast alert after three seconds. If no delay value is provided, it will default to eight seconds.close-label
: This is an optional attribute string that you can provide that sets the aria-label on the close button in the shadow DOM. The aria-label attribute will default to "Close".--pfe-toast--MaxWidth
.--pfe-toast--MinWidth
.--pfe-toast--Top
. --pfe-toast--Right
.Manually opens a toast. Return the toast that has been opened.
document.querySelector("pfe-toast").open();
Manually closes a toast. Returns the toast that has been closed.
document.querySelector("pfe-toast").close();
Manually toggles a toast. Returns the toast that has been toggled.
document.querySelector("pfe-toast").toggle();
Fires when a toast is manually openned.
Fires when a toast is manually closed.
npm run test
npm run build
From the PFElements root directory, run:
npm start
Toast (and all PFElements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.
FAQs
Toast element for PatternFly Elements
The npm package @patternfly/pfe-toast receives a total of 285 weekly downloads. As such, @patternfly/pfe-toast popularity was classified as not popular.
We found that @patternfly/pfe-toast demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.