Skip to main content

Alert

About 705 wordsAbout 2 min

Alert

installation

import { FgAlert } from 'fadgram-vue'

Props

PropTypeRequiredDefaultDescription
classstringNonullAdditional CSS classes for the alert container.
attsobjectNo{}Extra HTML attributes to bind to the root element.
typeAlertType (string)No'info'Alert type (e.g., info, success, error, etc.).
softbooleanNofalseApplies a soft background style.
outlinebooleanNofalseApplies an outlined border style.
successbooleanNofalseShortcut to set type to success. Overrides type prop.
infobooleanNofalseShortcut to set type to info. Overrides type prop.
warningbooleanNofalseShortcut to set type to warning. Overrides type prop.
errorbooleanNofalseShortcut to set type to error. Overrides type prop.
sizestringNonullOptional size class (e.g., text-sm, text-lg, etc.).
iconstringNonullCustom icon class name (overrides the default type-based icon).
iconClassstringNonullAdditional classes to apply to the icon.
contentstringNonullContent shown when no slot is used. Rendered using v-html.
hideIconbooleanNofalseIf true, no icon is shown, even if type or icon is provided.

Basic usage

Preview
This is alert example

Types

Preview
This is alert success
This is alert info
This is alert warning
This is alert error

Variants

Preview

Default (info)

This is alert default
This is alert soft
This is alert outline

Success

This is alert default
This is alert soft
This is alert outline

Warning

This is alert default
This is alert soft
This is alert outline

Error

This is alert default
This is alert soft
This is alert outline

Sizes

Preview
This is alert size xxs
This is alert size xs
This is alert size sm
This is alert size default
This is alert size lg
This is alert size xl
This is alert size xxl