Alert Boxes¶
Alert boxes are used to display important messages with appropriate visual styling. They support different types for various message contexts.
Success Alert¶
Success! All tests passed successfully. Your infrastructure is ready.
Error Alert¶
Error: Connection failed. Please check your API credentials.
Warning Alert¶
Warning: Some tests are taking longer than expected. Consider optimizing your network settings.
Info Alert¶
Note: This test requires at least 2GB of available memory to run properly.
Available Classes¶
| Class | Description | Color Scheme |
|---|---|---|
phantom-alert success |
Success messages | Green |
phantom-alert error |
Error messages | Red |
phantom-alert warning |
Warning messages | Orange |
phantom-alert info |
Informational messages | Blue |
Usage Without Icons¶
Alerts can also be used without icons for a cleaner look:
Success! Operation completed successfully.
Error: Invalid configuration detected.
Warning: This action cannot be undone.
Info: New version available for download.
Multi-line Alerts¶
For longer messages, alerts maintain proper formatting:
Installation Requirements:
Before proceeding with the installation, please ensure:
Before proceeding with the installation, please ensure:
- Python 3.8 or higher is installed
- Docker is running and accessible
- You have at least 4GB of free disk space
- Your API token has been configured
Best Practices¶
- Icon Usage: Always pair alerts with appropriate Font Awesome icons
- Title Format: Use
<strong>tags for alert titles (Success!, Error:, Warning:, Note:) - Message Length: Keep messages concise and actionable
- Contextual Use:
- Success: Confirm completed actions
- Error: Show failures that need attention
- Warning: Highlight potential issues
- Info: Provide helpful information
Common Use Cases¶
Form Validation¶
Validation Error: Please fill in all required fields.
System Status¶
System Status: All services are operational.
Configuration Tips¶
Tip: You can customize the timeout value in the configuration file.
Deprecation Notice¶
Deprecation Notice: This feature will be removed in version 3.0.