Warnung
Warnkomponente für Feedback.
Wann zu verwenden
- Wenn Sie Benutzern Warnmeldungen anzeigen müssen.
- Wenn Sie einen dauerhaften statischen Container benötigen, der durch Benutzeraktionen geschlossen werden kann.
Grundlegend
Die einfachste Verwendung für kurze Nachrichten.
Success Text
Info Text
Warning Text
Error Text
astro
---
import Alert from '@/components/feedback/Alert.astro';
---
<Alert variant="success" title="Success Text" />
<Alert variant="info" title="Info Text" />
<Alert variant="warning" title="Warning Text" />
<Alert variant="error" title="Error Text" /> Schließbar
Um eine Schließen-Schaltfläche anzuzeigen.
Warning Text
Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text
Error Text
Error Description Error Description Error Description Error Description Error Description Error Description
astro
---
import Alert from '@/components/feedback/Alert.astro';
---
<Alert variant="warning" title="Warning Text" closable>
Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text
</Alert>
<Alert variant="error" title="Error Text" closable>
Error Description Error Description Error Description Error Description Error Description Error Description
</Alert> Beschreibung
Zusätzliche Beschreibung für die Warnmeldung.
Success Text
Success Description Success Description Success Description
Info Text
Info Description Info Description Info Description Info Description
Warning Text
Warning Description Warning Description Warning Description Warning Description
Error Text
Error Description Error Description Error Description Error Description
astro
---
import Alert from '@/components/feedback/Alert.astro';
---
<Alert variant="success" title="Success Text">
Success Description Success Description Success Description
</Alert>
<Alert variant="info" title="Info Text">
Info Description Info Description Info Description Info Description
</Alert>
<Alert variant="warning" title="Warning Text">
Warning Description Warning Description Warning Description Warning Description
</Alert>
<Alert variant="error" title="Error Text">
Error Description Error Description Error Description Error Description
</Alert> Benutzerdefiniertes Symbol
Machen Sie Informationen klarer und freundlicher, um individuelle Bedürfnisse zu erfüllen.
Success Tips
Detailed description and advices about successful copywriting.
Informational Notes
Additional description and informations about copywriting.
Warning
This is a warning notice about copywriting.
Error
This is an error message about copywriting.
astro
---
import Alert from '@/components/feedback/Alert.astro';
---
<Alert variant="success" title="Success Tips" icon="ThumbsUp">
Detailed description and advices about successful copywriting.
</Alert>
<Alert variant="info" title="Informational Notes" icon="Info">
Additional description and informations about copywriting.
</Alert>
<Alert variant="warning" title="Warning" icon="TriangleAlert">
This is a warning notice about copywriting.
</Alert>
<Alert variant="error" title="Error" icon="CircleX">
This is an error message about copywriting.
</Alert> API Reference
| Eigenschaft | Beschreibung | Typ | Standard |
|---|---|---|---|
| variant | Die Variante des Alerts, die dessen Farben und Standard-Icon bestimmt. | 'info' | 'success' | 'warning' | 'error' | 'info' |
| title | Optionaler Titeltext für den Alert. | string | - |
| icon | Benutzerdefiniertes Icon zum Überschreiben des Standardwerts der Variante. Muss ein gültiger IconName sein. | IconName | - |
| closable | Wenn wahr, wird ein Schließen-Button angezeigt, der den Alert bei Klick schließt. | boolean | false |