docs(loading): improve docs

This commit is contained in:
Eric Liu 2025-05-03 09:20:33 -07:00
commit 7d8237a7a2

View file

@ -1,16 +1,28 @@
---
components: ["Loading"]
---
<script>
import { Loading } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
The `Loading` component provides a full-screen or inline loading indicator. It's ideal for showing progress during page loads or data fetching operations.
## Default (with overlay)
Display a loading indicator with a semi-transparent overlay that covers the entire viewport.
<FileSource src="/framed/Loading/Loading" />
## No overlay
Show a loading indicator without the overlay, allowing interaction with the underlying content.
<Loading withOverlay={false} />
## Small size
Display a more compact loading indicator.
<Loading withOverlay={false} small />