Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<style>
.demo-widget {
background: #f1f1f1;
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.demo-container {
max-width: 800px;;
width: 100%;
}
</style>

<label>
<input type=checkbox bind:checked={fillFree} />
'Fill space' is {fillFree ? 'enabled' : 'disabled'}
</label>

<div class=demo-container>
<Grid bind:items={items} rowHeight={100} let:item let:dataItem {cols} fillSpace={fillFree}>
<div class=demo-widget>{dataItem.id}</div>
</Grid>
</div>

<script>
import Grid from "svelte-grid@latest";
import gridHelp from "svelte-grid@latest/build/helper/index.mjs";

let fillFree = true;

const id = () => "_" + Math.random().toString(36).substr(2, 9);

const randomHexColorCode = () => {
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */