Components
Alert
A notice drawn on the page: a wash of the status pigment, one heavier hairline on the leading edge, the serif for its title.
#Basic usage
Renewal scheduled
The archive will be reindexed tonight.
Sealed and delivered
Your petition reached the desk.
Stamp expiring
The permit lapses in seven days.
Delivery refused
The address could not be verified.
<script setup lang="ts">
import { Alert } from "@bysages/vue";
const notices = [
{
status: "info",
title: "Renewal scheduled",
description: "The archive will be reindexed tonight.",
},
{
status: "success",
title: "Sealed and delivered",
description: "Your petition reached the desk.",
},
{ status: "warning", title: "Stamp expiring", description: "The permit lapses in seven days." },
{
status: "danger",
title: "Delivery refused",
description: "The address could not be verified.",
},
];
</script>
<template>
<div class="grid gap-4">
<Alert.Root v-for="n in notices" :key="n.status" :status="n.status" class="w-120">
<Alert.Icon />
<Alert.Body>
<Alert.Title>{{ n.title }}</Alert.Title>
<Alert.Description>{{ n.description }}</Alert.Description>
</Alert.Body>
</Alert.Root>
</div>
</template>
#Props
#AlertRoot
| Prop | Type | Default | Description |
|---|---|---|---|
status | String | "ink" | — |
#AlertIcon
A styled part — no props of its own; it takes the anatomy's shared styling.
#AlertBody
A styled part — no props of its own; it takes the anatomy's shared styling.
#AlertTitle
A styled part — no props of its own; it takes the anatomy's shared styling.
#AlertDescription
A styled part — no props of its own; it takes the anatomy's shared styling.