# LoadingSuccessDiv — SvelteKit UI

Package: sveltekit-ui 1.1.94

Page: https://www.sveltekit-ui.com/components/loading_success_div

Category: Feedback

A container to display loading, success, or error states with an optional message. It provides visual feedback for processes like loading or completion.

Public component import: `LoadingSuccessDiv`

## Usage

```svelte
<script>
  // Import the shared stylesheet once in your application's root layout.
  import "sveltekit-ui/style.css"
  import { LoadingSuccessDiv } from "sveltekit-ui"
</script>

<LoadingSuccessDiv show_screen="success" message="Your changes were saved." size={5} />
```

## Properties

### `message`

- type: string
- default: null
- description: Optional message displayed below the icon.

### `show_screen`

- type: enum
- options:
  - loading
  - success
  - error
- default: loading
- description: Defines the state of the component: loading (shows a loading spinner), success (shows a success check), or error (shows an error icon).

### `size`

- type: number
- default: 8
- description: Size of the icon in rem.

### `ml`

- type: number
- default: 1
- description: Margin-left in rem.

### `mr`

- type: number
- default: 1
- description: Margin-right in rem.

### `mt`

- type: number
- default: 1
- description: Margin-top in rem.

### `mb`

- type: number
- default: 1
- description: Margin-bottom in rem.

### `flex`

- type: number
- default: 1
- description: Flex-grow value for the container.
