# Snack

## Preview

![](https://3422846761-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LGP0U4aBj2zuNdsU1Qu%2F-LH8-5511s85Jva_AEqK%2F-LH8-DlVJGCNorXpexst%2Fsnack.gif?alt=media\&token=e1ada28f-fcc8-4bc8-b322-f88ee5663639)

## Code sample

```jsx
import { Snack } from '@dormakaba/digital-reactnative-visual';

<Snack
  ref={(c) => { this.snack = c; }}
  error
  message="Lorem ipsum..."
/>

// to show use function on ref
this.snack.show();

// to hide use function on ref
this.snack.hide(); 
```

## Props

| **Name** | **Type** | **Description**                                |
| -------- | -------- | ---------------------------------------------- |
| message  | string   | message to show                                |
| \*       |          | all of [`notification`](../notification#props) |
