Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danielitoCode/compose_svelted/llms.txt

Use this file to discover all available pages before exploring further.

Column, Row, and Box are the three fundamental layout containers in Compose Svelted, mirroring their Jetpack Compose counterparts exactly. Column stacks children along the vertical axis, Row arranges them horizontally, and Box overlays them in a single grid cell — letting you build virtually any screen structure through composition alone. All three accept a modifier prop for sizing, padding, scrolling, and more.
Column is a vertical flex container. It maps horizontalAlignment to CSS align-items (the cross axis) and verticalArrangement to CSS justify-content (the main axis). When you use Arrangement.spacedBy(n), a CSS gap is applied automatically.
PropTypeDefaultDescription
modifierModifierModifier.empty()Size, padding, scroll, and other CSS modifiers.
horizontalAlignmentHorizontalAlignmentAlignment.StartCross-axis alignment applied to all children via align-items.
verticalArrangementArrangementValueArrangement.TopMain-axis distribution of children via justify-content. When type is 'spaced', adds a pixel gap.
HorizontalAlignment values
TokenCSS value
Alignment.Startflex-start
Alignment.CenterHorizontallycenter
Alignment.Endflex-end
ArrangementValue values for Column
TokenBehaviour
Arrangement.TopPack children toward the top
Arrangement.BottomPack children toward the bottom
Arrangement.CenterCenter children vertically
Arrangement.SpaceBetweenEqual space between children
Arrangement.SpaceAroundEqual space around children
Arrangement.SpaceEvenlyEqual space between and around
Arrangement.spacedBy(n)Fixed n px gap between each child
Arrangement.spacedBy(n, Arrangement.Center)Fixed gap, centered along the axis
<script>
  import { Column, Text, Modifier, Alignment, Arrangement } from '@danielito1996/compose-svelted';
</script>

<Column
  modifier={Modifier.padding(16).fillMaxWidth()}
  horizontalAlignment={Alignment.CenterHorizontally}
  verticalArrangement={Arrangement.spacedBy(12)}
>
  <Text textStyle="titleLarge">Title</Text>
  <Text>Body text</Text>
</Column>
Scrolling is not enabled by default. Wrap the content in Modifier.verticalScroll(true) for an inline-scrollable Column, or use LazyColumn for long lists that benefit from virtualization.
<Column modifier={Modifier.fillMaxSize().verticalScroll(true)}>
  <!-- hundreds of items are fine here -->
</Column>

Build docs developers (and LLMs) love