Skip to main content

Snackbar

This is the <Snackbar /> component. Use the appearance to change the variants


This is an info snackbar

This is a warning snackbar

This is an error snackbar

This is a success snackbar

This is a success snackbar

This is a success snackbar

This is a success snackbar

This is a success snackbar

Basic Usage

import Snackbar from '@candy/kitkat/snackbar'

export const MyComponent = () => (
<Snackbar appearance="generic">This is an alert</Snackbar>
)

Props

NameTypeDefaultDescription
appearance info / error / success / warning / infoinfoDisplays color and icon for intent
childrenReactNode-Text Content
dismissOnCallbackbooleanfalseDisplays "DISMISS" text and hides Snackbar on DISMISS click
dismissTriggerReactNode-A custom trigger for DISMISS may be used
customActionReactNode-Customized Buttons and Actions other than DISMISS