# SnackbarItem (w-snackbar-item)

## Description

An item to show in a `w-snackbar`.

See the `create` function on `w-snackbar` for a convenience API which helps you make snackbar items.

[Warp component reference](https://warp-ds.github.io/docs/components/snackbar/frameworks/elements)

### `<w-snackbar-item>` API

#### Properties

| Name | Type | Default | Summary |
|-|-|-|-|
| action-placement | [`SnackbarActionPlacement`](#snackbaractionplacement) | `"inline"` | The placement of the action and close buttons. |
| close (JS only) | `close() => void` | `-` | Remove the snackbar item from the document. |
| duration | `number` | `-` | How long the message should stay in the document before removing itself. |

#### Property Details

##### action-placement

The placement of the action and close buttons.

- Type: [`SnackbarActionPlacement`](#snackbaractionplacement)
- Default: `"inline"`

##### close (JS only)

Remove the snackbar item from the document.

Moves focus to the last focused element outside of the snackbar item, if available.

- Type: `close() => void`
- Default: `-`

##### duration

How long the message should stay in the document before removing itself.

- Type: `number`
- Default: `-`

#### Types

##### SnackbarActionPlacement

`'inline' | 'block'`

