Inkline includes several predefined toast colors that you can use within your application. You can apply a style using the color property.
Preview
Component.vue
<template>
<IToastcolor="light">
<p>Heads up! This toast needs your attention, but it's not super important.</p>
</IToast>
<IToastcolor="dark">
<p>Heads up! This toast needs your attention, but it's not super important.</p>
</IToast>
<IToastcolor="info">
<p>Heads up! This toast needs your attention, but it's not super important.</p>
</IToast>
<IToastcolor="success">
<p>Well done! You successfully read this important toast message.</p>
</IToast>
<IToastcolor="warning">
<p>Warning! Better check yourself, you're not looking too good.</p>
</IToast>
<IToastcolor="danger">
<p>Oh snap! Change a few things up and try submitting again.</p>
</IToast>
</template>
You're able to use the size modifier to control the text and spacing size of your toasts, using one of the available sizes: sm, md, and lg.
Preview
Component.vue
<template>
<IToastsize="sm"> Some quick example text to build on the toast content. </IToast>
<IToastsize="md"> Some quick example text to build on the toast content. </IToast>
<IToastsize="lg"> Some quick example text to build on the toast content. </IToast>
</template>
Inkline's toast notifications allow you to fully customize the content displayed, including icons, titles, and messages. By utilizing hoisting, you can render your own custom elements, giving you complete control over the look and feel of your toasts.
This level of customization ensures that your notifications align seamlessly with your application's design and branding, enhancing the overall user experience.
Preview
Component.vue
<scriptlang="ts"setup>
import { h } from'vue';
import { IIcon } from'@inkline/inkline/components';
consticon=h(IIcon, { name: 'ink-circle' });
consttitle=h('span', 'Toast title');
constmessage=h('p', 'Toast icon, message, and title rendered using VNode');
</script>
<template>
<IToast:icon="icon":title="title":message="message" />
</template>