Skip to content

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:
  • 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

  1. Icon Usage: Always pair alerts with appropriate Font Awesome icons
  2. Title Format: Use <strong> tags for alert titles (Success!, Error:, Warning:, Note:)
  3. Message Length: Keep messages concise and actionable
  4. Contextual Use:
  5. Success: Confirm completed actions
  6. Error: Show failures that need attention
  7. Warning: Highlight potential issues
  8. 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.