Feedback.flash
Server-rendered
Renders a flash notice.
Drop-in replacement for the Phoenix generated flash/1 core component. Accepts the same attributes and slots, so you can swap it in without changing any call sites.
To replace the default Phoenix flash, remove the flash/1 function from your core_components.ex and add import CinderUI.Components.Feedback (or use CinderUI.Components which imports all modules).
Info flash
Settings saved.
<.flash kind={:info}>Settings saved.</.flash>
Error flash
Unable to save changes.
<.flash kind={:error}>Unable to save changes.</.flash>
Success flash
Workspace created.
<.flash kind={:success}>Workspace created.</.flash>
Warning flash
Trial ends in 3 days.
<.flash kind={:warning}>Trial ends in 3 days.</.flash>
Attributes
| Name | Type | Default | Values | Global Includes |
|---|---|---|---|---|
flash
|
:map |
%{}
|
— | — |
id
|
:string |
— | — | — |
kind
|
:atom |
— |
:info
,
:error
,
:success
,
:warning
|
— |
rest
|
:global |
— | — | — |
title
|
:string |
— | — | — |
Slots
| Slot | Slot Attributes |
|---|---|
inner_block
|
— |