Package-level declarations

Layout primitives (JengaStack, JengaInline, JengaWrap, JengaGrid, JengaBox, JengaSection, JengaSpacer) that read spacing tokens so you never hand-roll gaps.

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun JengaBox(modifier: Modifier = Modifier, padding: PaddingValues = PaddingValues(0.dp), background: Color = Color.Unspecified, shape: Shape = RectangleShape, border: BorderStroke? = null, contentAlignment: Alignment = Alignment.TopStart, content: @Composable BoxScope.() -> Unit)

The primitive styled container: a Box that bundles the common padding / background / shape / border into parameters, so feature code stops writing Modifier.clip().background().border().padding() chains. (Polaris / Chakra Box.)

Link copied to clipboard
fun JengaFormLayout(modifier: Modifier = Modifier, bottomBar: @Composable () -> Unit? = null, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = JengaFormLayoutDefaults.contentPadding, spacing: Dp = JengaFormLayoutDefaults.spacing, content: LazyListScope.() -> Unit)

A keyboard-aware form: a lazily laid out body of fields with an optional bottomBar (e.g. a submit button) pinned below it. When the keyboard opens, the body shrinks and the bottom bar rides on top of the keyboard, so the focused field and the primary action stay visible.

Link copied to clipboard
fun JengaGrid(columns: Int, modifier: Modifier = Modifier, horizontalSpace: Dp = JengaTheme.spacing.md, verticalSpace: Dp = JengaTheme.spacing.md, content: @Composable () -> Unit)

A non-scrolling grid that lays children out in columns equal-width columns with token gaps, the "stop nesting Rows of Columns" primitive. (Braid Tiles / Polaris InlineGrid / Chakra SimpleGrid.)

Link copied to clipboard
fun JengaInline(modifier: Modifier = Modifier, space: Dp = JengaTheme.spacing.md, verticalAlignment: Alignment.Vertical = Alignment.CenterVertically, content: @Composable RowScope.() -> Unit)

A horizontal row with token-based spacing; use instead of a hand-spaced Row. (Braid/Polaris Inline / Chakra HStack.) Does not wrap; see JengaWrap.

Link copied to clipboard
fun JengaSection(modifier: Modifier = Modifier, title: String? = null, subtitle: String? = null, actionLabel: String? = null, onActionClick: () -> Unit? = null, space: Dp = JengaTheme.spacing.md, content: @Composable ColumnScope.() -> Unit)

A titled section: an optional header (title + supporting line + trailing action, via JengaSectionHeader) above a token-spaced body. Use to structure a screen into labelled blocks without re-plumbing Columns and headers.

Link copied to clipboard
fun JengaSpacer(modifier: Modifier = Modifier, size: Dp = JengaTheme.spacing.md)

A fixed-size empty gap from a spacing token. Inside a JengaStack/JengaInline you rarely need this (their space handles gaps); use it for one-off spacing.

Link copied to clipboard
fun JengaStack(modifier: Modifier = Modifier, space: Dp = JengaTheme.spacing.md, horizontalAlignment: Alignment.Horizontal = Alignment.Start, content: @Composable ColumnScope.() -> Unit)

A vertical stack with token-based spacing between children; use instead of a hand-spaced Column. (Braid Stack / Polaris BlockStack / Chakra VStack.)

Link copied to clipboard
fun JengaWrap(modifier: Modifier = Modifier, space: Dp = JengaTheme.spacing.sm, lineSpace: Dp = space, content: @Composable FlowRowScope.() -> Unit)

A horizontal layout that wraps onto new lines when it runs out of width, with token spacing in both axes, for chips, tags and similar. (Braid Inline with wrap / Chakra Wrap.)