Reference
Column
A child of the 12-column grid, spanning span columns.
Column(span: Number, stacks: Bool) { … }
Before 5.0
Article
The main column takes eight of the twelve on a wide screen.
Related
LayoutExample
Row(gap: .md) {
Column(span: { base: 12, md: 8 }) {
Card {
Card.Body {
Heading("Article").h3
Text("The main column takes eight of the twelve on a wide screen.")
}
}
}
Column(span: { base: 12, md: 4 }) {
Card.outlined {
Card.Body {
Heading("Related").h3
Link("Layout", to: "/learn")
}
}
}
}
Halves that stack on a phone
Row(gap: .md) {
Column(span: 6).stacks { Card { Card.Body { Text("Monthly") } } }
Column(span: 6).stacks { Card { Card.Body { Text("Yearly") } } }
}
Props
| Prop | Type | Unset | Meaning |
|---|---|---|---|
span: | Number | none: it shares what is left equally ( | How many of the row's 12 columns it takes, a whole number 1–12 ( |
stacks: | Bool | false | Full width below 768px; a |
Attribute families: global, aria, data. Plus the 22 universal props every element takes: animate:, exit:, speed:, duration:, delay:, easing:, stagger:, on:, count:, shared:, class:, ref:, drag:, dragGroup:, dropValue:, dropAxis:, dropInside:, roving:, trapFocus:, mount:, update:, cleanup:.
Flags and cases
A flag is written after the parentheses with a dot: a Bool prop, or a case of one of the element's enum props. A case the enum lacks is an error with a hint.
.stacks
Events
Every element also takes the props, the events and the attribute families listed on every element.
Slots
children
Renders with the class wf-col, stable across releases, so a stylesheet may target it.