Module for building View.
Generates a view that displays a text string.
The first argument specifies the line height, which is the size of the gap between text lines when the given text is wrapped.
It is an alias for \str -> fromTexts gap [ Neat.Text.fromString str ].
Note that textBlock gap "" does not generate anything.
Build a text block from Texts.
Unlike a row consist of textBlocks, the fromTexts generates a single coherent sentence.
Say you have the following code:
row
defaultRow
[ textBlock myLineHeight
"foo bar baz"
, textBlock myLineHeight
"a b c d e f"
]The resulting View will be newlined as follows:
| foo bar | a b c d |
| baz | e f |In contrast, the View generated by the following code behaves a bit differently:
import Neat.Text as Text
fromTexts
[ Text.text "foo bar baz"
, Text.text "a b c d e f"
]The resulting View will be newlined as follows:
| foo bar baz a b c |
| d e f |Note that fromTexts gap [] does not generate anything.
Set "role" value for WAI-ARIA.
Set "aria-*" value for WAI-ARIA.
e.g., setAria "required" "true" stands for "aria-required" is "true".
Set boolean "aria-*" value for WAI-ARIA.
i.e.,
setBoolAria name True is equal to setAria name "true"setBoolAria name False is equal to setAria name "false"Align children horizontally.
Default setting for rows.
Each function has the String argument, which helps make the DOM modifications more efficient. It must be unique among items in the same row.
Row item with stretched height.
Top-aligned item.
Vertically centered item.
Bottom-aligned item.
Row item with stretched height and width.
Top-aligned item which grows its width as much as possible.
Vertically centered item which grows its width as much as possible.
Bottom-aligned item which grows its width as much as possible.
Align children vertically.
Default setting for columns.
Each function has the String argument, which helps make the DOM modifications more efficient. It must be unique among items in the same row.
Column item with stretched width.
Left-aligned item.
Horizontally centered item.
Right-aligned item.
Column item with stretched width and height.
Left-aligned item which grows its height as much as possible.
Horizontally centered item which grows its height as much as possible.
Right-aligned item which grows its height as much as possible.
Generates no HTML nodes. This is useful for handling elements which only appears under certain conditions.
when p v =
if p then
v
else
noneInsert a view only when a condition is met.
Insert a view unless a condition is met.
Insert a view only if the given value is Just.
Expand View Gap to a wider one.
You can use expandGap to "shrink" Gaps, but we do not recommend doing so. Such layouts must not be "neat"!
BoundaryWrap a view with boundary. This is the only way to reset view gaps.
A gap-sensible
Html msgalternative.