Web Components 토스트는 메시지 내용을 표시하고 최종 사용자에게 변경된 레코드의 상태를 알리는 데 사용되는 매우 가볍고 작은 팝업 구성 요소입니다. 화면의 하단이나 다른 지정된 영역에 Web Components 토스트 알림을 쉽게 배치하고 표시할 수 있습니다. 또는 간단하고 쉬운 방법으로 해제할 수도 있습니다.
Web Components 토스트 구성 요소는 주로 시스템 메시징, 푸시 알림, 경고 메시지 및 정보에 사용됩니다. 사용자가 해제할 수 없습니다. 이 컨트롤에는 애니메이션 효과, 토스트 구성 요소가 표시되는 시간을 구성하는 표시 시간 속성, 스타일링 등과 같은 다양한 기능이 있습니다.
Web Components Toast Example
아래의 간단한 Ignite UI for Web Components Toast 예제를 살펴보세요. 버튼을 클릭하면 애니메이션 알림 메시지가 팝업됩니다.
<!DOCTYPE html><html><head><title>Toast Overview</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png"><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-buttononclick="toast.show()"variant="contained">Show Toast</igc-button><igc-toastid="toast">Toast Message</igc-toast></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %>
<scriptsrc="src/index.ts"></script>
<% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Like this sample? Get access to our complete Ignite UI for Web Components toolkit and start building your own apps in minutes. Download it for free.
How To Use Ignite UI for Web Components Toast Notification
먼저 다음 명령을 실행하여 Ignite UI for Web Components 설치해야 합니다.
<!DOCTYPE html><html><head><title>Toast Properties</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png"><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><divclass="button-container"><igc-buttononclick="toast.toggle()"variant="contained">Toggle Toast</igc-button><igc-buttononclick="toast.keepOpen = !toast.keepOpen"variant="contained">Toggle keepOpen property</igc-button><igc-buttononclick="toast.displayTime = 8000"variant="contained">Set DisplayTime to 8000</igc-button></div><igc-toastid="toast">Toast Message</igc-toast></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %>
<scriptsrc="src/index.ts"></script>
<% } %>
</body></html>html
<!DOCTYPE html><html><head><title>Styled Toast</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png"><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-buttononclick="toast.show()"variant="contained">Show Styled Toast</igc-button><igc-toastid="toast">Styled Toast</igc-toast></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %>
<scriptsrc="src/index.ts"></script>
<% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css