Install
$ agentstack add skill-jiaiyan-element-plus-skills-el-notification ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Element Plus Notification Component
Displays a global notification message at the corner of the page.
When to Invoke
Invoke this skill when:
- User needs to show persistent notifications
- User wants to display notifications with title and message
- User needs to position notifications at different corners
- User wants to customize notification content
- User asks about notification with HTML or VNode
Features
- Multiple Types: success, warning, info, error
- Custom Position: top-right, top-left, bottom-right, bottom-left
- Closable: Manual or auto-close
- Custom Duration: Configurable display time
- HTML Content: Support for HTML strings
- VNode Support: Render Vue components as content
- Custom Icons: Custom icon support
- Offset: Distance from screen edge
API Reference
Notification Options
| Name | Description | Type | Default | |------|-------------|------|---------| | title | title | string | '' | | message | description text | string \| VNode \| Function | '' | | dangerouslyUseHTMLString | whether message is HTML | boolean | false | | type | notification type | 'primary' \| 'success' \| 'warning' \| 'info' \| 'error' | '' | | icon | custom icon component | string \| Component | — | | customClass | custom class name | string | '' | | duration | duration before close (ms), 0 = no auto close | number | 4500 | | position | custom position | 'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left' | top-right | | showClose | whether to show close button | boolean | true | | onClose | callback when closed | () => void | — | | onClick | callback when clicked | () => void | — | | offset | offset from screen edge | number | 0 | | appendTo | which element the notification appends to | string \| HTMLElement | — | | zIndex | initial zIndex | number | — |
Notification Methods
| Method | Description | Parameters | Return | |--------|-------------|------------|--------| | ElNotification | Show a notification | options | Notification instance | | ElNotification.success | Show success notification | message \| options | Notification instance | | ElNotification.warning | Show warning notification | message \| options | Notification instance | | ElNotification.info | Show info notification | message \| options | Notification instance | | ElNotification.error | Show error notification | message \| options | Notification instance | | ElNotification.closeAll | Close all notifications | — | — |
Notification Instance
| Method | Description | Type | |--------|-------------|------| | close | Close the notification | () => void |
Usage Examples
Basic Usage
Show Notification
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'Title',
message: 'This is a notification message'
})
}
Different Types
Success
Warning
Info
Error
import { ElNotification } from 'element-plus'
const openSuccess = () => {
ElNotification.success({
title: 'Success',
message: 'This is a success message'
})
}
const openWarning = () => {
ElNotification.warning({
title: 'Warning',
message: 'This is a warning message'
})
}
const openInfo = () => {
ElNotification.info({
title: 'Info',
message: 'This is an info message'
})
}
const openError = () => {
ElNotification.error({
title: 'Error',
message: 'This is an error message'
})
}
Custom Position
Top Right
Top Left
Bottom Right
Bottom Left
import { ElNotification } from 'element-plus'
const openTopRight = () => {
ElNotification({
title: 'Top Right',
message: 'Notification at top right',
position: 'top-right'
})
}
const openTopLeft = () => {
ElNotification({
title: 'Top Left',
message: 'Notification at top left',
position: 'top-left'
})
}
const openBottomRight = () => {
ElNotification({
title: 'Bottom Right',
message: 'Notification at bottom right',
position: 'bottom-right'
})
}
const openBottomLeft = () => {
ElNotification({
title: 'Bottom Left',
message: 'Notification at bottom left',
position: 'bottom-left'
})
}
With Offset
Notification with Offset
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'Offset',
message: 'This notification has 100px offset',
offset: 100
})
}
HTML Content
HTML Notification
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'HTML Content',
dangerouslyUseHTMLString: true,
message: 'This is HTML content'
})
}
VNode Content
VNode Notification
import { ElNotification, h } from 'element-plus'
const open = () => {
ElNotification({
title: 'VNode Content',
message: h('i', { style: 'color: teal' }, 'This is VNode content')
})
}
Hide Close Button
No Close Button
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'No Close',
message: 'This notification has no close button',
showClose: false
})
}
Custom Duration
Long Duration
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'Long Duration',
message: 'This notification will stay for 10 seconds',
duration: 10000
})
}
Manual Close
Show
Close
import { ElNotification } from 'element-plus'
let notification = null
const open = () => {
notification = ElNotification({
title: 'Manual Close',
message: 'Click the button to close',
duration: 0 // No auto close
})
}
const close = () => {
if (notification) {
notification.close()
notification = null
}
}
Click Callback
Clickable Notification
import { ElNotification } from 'element-plus'
const open = () => {
ElNotification({
title: 'Click Me',
message: 'Click this notification to trigger callback',
onClick: () => {
console.log('Notification clicked!')
}
})
}
Close All
Show Multiple
Close All
import { ElNotification } from 'element-plus'
const openMultiple = () => {
ElNotification.success({ title: 'Success', message: 'Message 1' })
ElNotification.warning({ title: 'Warning', message: 'Message 2' })
ElNotification.info({ title: 'Info', message: 'Message 3' })
}
const closeAll = () => {
ElNotification.closeAll()
}
Common Issues
1. Notification Not Showing
Ensure Element Plus styles are imported:
import 'element-plus/dist/index.css'
2. Notifications Overlapping
Use offset to adjust position:
ElNotification({ message: 'Message 1', offset: 0 })
ElNotification({ message: 'Message 2', offset: 100 })
3. Notification Not Closing
Check duration setting. Use duration: 0 for manual close:
const notification = ElNotification({ message: 'Manual close', duration: 0 })
// Later
notification.close()
Best Practices
- Use appropriate types: Use success, warning, error, info appropriately
- Keep messages short: Notifications should be concise
- Use title: Always include a meaningful title
- Position consistently: Use consistent position across the app
- Handle async operations: Show notifications for async operation results
- Avoid HTML: Prefer VNode over HTML strings for security
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jiaiyan
- Source: jiaiyan/element-plus-skills
- License: MIT
- Homepage: https://skills.sh/jiaiyan/element-plus-skills/element-plus-skills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.