← all modules
Std.Ui
Std.Ui
Std.Ui — typed, no-CSS layout DSL for Sky.Live / Sky.Tui / Sky.Webview.
Types
type Element = Empty | Text String | Node Description (List (Attribute msg)) (List (Element msg)) | TaggedNode String Description (List (Attribute msg)) (List (Element msg)) | Raw any
type Attribute = NoAttribute | AttrWidth Length | AttrHeight Length | AttrAlignX HAlign | AttrAlignY VAlign | AttrNearby Location (Element msg) | AttrPadding Int Int Int Int | AttrSpacing Int | AttrStyle String String | AttrDescribe Description | AttrClass String | AttrEvent any | AttrAttribute String String | AttrFontSize Int | AttrFontColor Color | AttrFontFamily String | AttrFontWeight Int | AttrFontItalic | AttrFontUnderline | AttrFontDecoration String | AttrFontLetterSpacing Float | AttrFontWordSpacing Float | AttrFontAlign String | AttrBgColor Color | AttrBgImage String | AttrBgGradient String | AttrBorderWidth Int | AttrBorderWidthEach Int Int Int Int | AttrBorderColor Color | AttrBorderRounded Int | AttrBorderStyle String | AttrBorderShadow Int Int Int Int Color | AttrBorderInsetShadow Int Int Int Int Color | AttrPointer | AttrOverflow String String | AttrPseudoRule PseudoClass String | AttrTransition String Bool | AttrAnimation String String String Bool
type PseudoClass = Hover | Focus | FocusVisible | Active | Disabled
type Length = Px Int | Content | Fill Int | Min Int Length | Max Int Length | Vh Int | Vw Int
type HAlign = AlignLeft | CenterX | AlignRight
type VAlign = AlignTop | CenterY | AlignBottom
type Location = Above | Below | OnRight | OnLeft | InFront | Behind
type Color = Rgba Int Int Int Float
type Description = NoDescription | DescMain | DescNavigation | DescContentInfo | DescComplementary | DescHeading Int | DescLabel String | DescLivePolite | DescLiveAssertive | DescButton | DescParagraph
type LayoutContext = AsRow | AsColumn | AsEl | AsParagraph | AsTextColumn
type Breakpoint = SmAndUp | MdAndUp | LgAndUp | XlAndUp | Mobile | Tablet | Desktop | DarkMode | LightMode | ReducedMotion | TouchDevice | Portrait | Landscape | Custom Int Int
type AnimationEntry = AnimationEntry String String String Bool
type alias MarkerFlags
Values
above : Element msg -> Attribute msg
active : PseudoClass
alignBottom : Attribute msg
alignLeft : Attribute msg
alignRight : Attribute msg
alignSelfX : LayoutContext -> HAlign -> String
alignSelfY : LayoutContext -> VAlign -> String
alignTop : Attribute msg
alignXCss : LayoutContext -> HAlign -> String
alignYCss : LayoutContext -> VAlign -> String
animateRaw : String -> String -> String -> Bool -> Attribute msg
animationEntryName : AnimationEntry -> String
anyChildMainAxisFill : LayoutContext -> List (Element msg) -> Bool
ariaForDescription : Description -> Maybe any
aspectRatio : Float -> Attribute msg
aspectRatioWH : Int -> Int -> Attribute msg
attrsHaveMainAxisFill : LayoutContext -> List (Attribute msg) -> Bool
behind : Element msg -> Attribute msg
below : Element msg -> Attribute msg
bgColor : Color -> Attribute msg
bgGradient : String -> Attribute msg
bgImage : String -> Attribute msg
black : Color
borderColor : Color -> Attribute msg
borderInsetShadow : Int -> Int -> Int -> Int -> Color -> Attribute msg
borderRounded : Int -> Attribute msg
borderShadow : Int -> Int -> Int -> Int -> Color -> Attribute msg
borderStyle : String -> Attribute msg
borderWidth : Int -> Attribute msg
borderWidthEach : Int -> Int -> Int -> Int -> Attribute msg
breakpoint : Breakpoint -> List (Attribute msg) -> Element msg -> Element msg
breakpointToQuery : Breakpoint -> String
buildStyleString : Bool -> LayoutContext -> LayoutContext -> List (Attribute msg) -> String
buildStyleStringWith : MarkerFlags -> Bool -> LayoutContext -> LayoutContext -> List (Attribute msg) -> String
button : List (Attribute msg) -> { onPress : Maybe msg , label : Element msg } -> Element msg
centerX : Attribute msg
centerY : Attribute msg
cinemascope : Attribute msg
class : String -> Attribute msg
clip : Attribute msg
clipX : Attribute msg
clipY : Attribute msg
colMarker : Attribute msg
collectAnimations : List (Attribute msg) -> List AnimationEntry
collectHtmlAttrs : List (Attribute msg) -> List any
collectNearby : List (Attribute msg) -> List ( Location, Element msg )
collectPseudoRules : List (Attribute msg) -> List ( String, String )
collectStyle : LayoutContext -> LayoutContext -> Attribute msg -> String -> String
collectTransitions : List (Attribute msg) -> ( String, Bool )
colorCss : Color -> String
column : List (Attribute msg) -> List (Element msg) -> Element msg
customRangeQuery : Int -> Int -> String
darkMode : Breakpoint
defaultTagIn : LayoutContext -> String
descComplementary : Description
descContentInfo : Description
descHeading : Int -> Description
descLabel : String -> Description
descLiveAssertive : Description
descLivePolite : Description
descMain : Description
descNavigation : Description
describe : Description -> Attribute msg
desktop : Breakpoint
disabled : PseudoClass
dispatchTag : String -> List (Attr.Attribute msg) -> List (Html.Html msg) -> Html.Html msg
displayFor : LayoutContext -> String
displayIn : LayoutContext -> LayoutContext -> String
el : List (Attribute msg) -> Element msg -> Element msg
elementHasMainAxisFill : LayoutContext -> Element msg -> Bool
elementText : Element msg -> String
encodeAnimationEntry : AnimationEntry -> String
encodeAnimations : List AnimationEntry -> String
encodeOneEntry : ( String, String ) -> String
encodePseudoRules : List ( String, String ) -> String
fileMaxHeight : Int -> Attribute msg
fileMaxSize : Int -> Attribute msg
fileMaxWidth : Int -> Attribute msg
fill : Length
fillPortion : Int -> Length
findGridMin : List (Attribute msg) -> String
findGridTemplate : List (Attribute msg) -> String
findGridTracksRaw : List (Attribute msg) -> String
focus : PseudoClass
focusVisible : PseudoClass
fontAlign : String -> Attribute msg
fontColor : Color -> Attribute msg
fontDecoration : String -> Attribute msg
fontFamily : String -> Attribute msg
fontItalic : Attribute msg
fontLetterSpacing : Float -> Attribute msg
fontSize : Int -> Attribute msg
fontUnderline : Attribute msg
fontWeight : Int -> Attribute msg
fontWordSpacing : Float -> Attribute msg
form : List (Attribute msg) -> List (Element msg) -> Element msg
fullHd : Attribute msg
grid : List (Attribute msg) -> List (Element msg) -> Element msg
gridColumns : Int -> Attribute msg
gridDisplayIn : LayoutContext -> String
gridMarker : Attribute msg
gridTracksRaw : String -> String -> Attribute msg
hasExplicitHeight : List (Attribute msg) -> Bool
hasExplicitWidth : List (Attribute msg) -> Bool
hasMarker : String -> List (Attribute msg) -> Bool
height : Length -> Attribute msg
heightCss : Length -> String
heightCssIn : LayoutContext -> Length -> String
heightFillFor : LayoutContext -> Int -> String
hover : PseudoClass
html : any -> Element msg
htmlAttribute : String -> String -> Attribute msg
image : List (Attribute msg) -> { src : String , description : String } -> Element msg
inFront : Element msg -> Attribute msg
input : List (Attribute msg) -> Element msg
isFillLength : Length -> Bool
isHeightAttr : Attribute msg -> Bool
isHeightFillAttr : Attribute msg -> Bool
isMarker : String -> Attribute msg -> Bool
isTransitionOptOut : Attribute msg -> Bool
isWidthAttr : Attribute msg -> Bool
isWidthFillAttr : Attribute msg -> Bool
joinWithPipe : List String -> String
kernelAttr : String -> String -> any
landscape : Breakpoint
layout : List (Attribute msg) -> Element msg -> any
layoutContextFor : List (Attribute msg) -> LayoutContext
layoutContextFromFlags : MarkerFlags -> LayoutContext
layoutWith : { wrapperAttrs : List (Attribute msg) , rootAttrs : List (Attribute msg) } -> Element msg -> any
lgAndUp : Breakpoint
lightMode : Breakpoint
link : List (Attribute msg) -> { url : String , label : Element msg } -> Element msg
locationCss : Location -> String
markerFlagStep : Attribute msg -> MarkerFlags -> MarkerFlags
markerFlags : List (Attribute msg) -> MarkerFlags
maximum : Int -> Length -> Length
mdAndUp : Breakpoint
mediaQuery : String -> List (Attribute msg) -> Element msg -> Element msg
mediaQueryRulesCss : List (Attribute msg) -> String
minimum : Int -> Length -> Length
mobile : Breakpoint
name : String -> Attribute msg
noMarkerFlags : MarkerFlags
none : Element msg
onChange : (String -> msg) -> Attribute msg
onClick : msg -> Attribute msg
onFile : (String -> msg) -> Attribute msg
onFocus : msg -> Attribute msg
onImage : (String -> msg) -> Attribute msg
onInput : (String -> msg) -> Attribute msg
onKeyDown : msg -> Attribute msg
onLeft : Element msg -> Attribute msg
onMouseOut : msg -> Attribute msg
onMouseOver : msg -> Attribute msg
onPseudo : PseudoClass -> List (Attribute msg) -> Attribute msg
onRight : Element msg -> Attribute msg
onSubmit : a -> Attribute b
overflow : String -> String -> Attribute msg
padding : Int -> Attribute msg
paddingEach : { top : Int , right : Int , bottom : Int , left : Int } -> Attribute msg
paddingXY : Int -> Int -> Attribute msg
paragraph : List (Attribute msg) -> List (Element msg) -> Element msg
paragraphMarker : Attribute msg
pickAnimation : Attribute msg -> Maybe AnimationEntry
pickSemanticTag : String -> List (Attribute msg) -> String
pickTransitionShorthand : Attribute msg -> Maybe String
pointer : Attribute msg
portrait : Breakpoint
propagateFillToContainer : LayoutContext -> List (Attribute msg) -> List (Element msg) -> List (Attribute msg)
pseudoClassSelector : PseudoClass -> String
pseudoClassTag : PseudoClass -> String
pseudoRuleEntry : Attribute msg -> Maybe ( String, String )
px : Int -> Length
reducedMotion : Breakpoint
renderElement : LayoutContext -> List (Attribute msg) -> Element msg -> any
renderNearby : ( Location, Element msg ) -> any
renderNodeAs : String -> LayoutContext -> List (Attribute msg) -> List (Attribute msg) -> List (Element msg) -> any
rgb : Int -> Int -> Int -> Color
rgb255 : Int -> Int -> Int -> Color
rgba : Int -> Int -> Int -> Float -> Color
row : List (Attribute msg) -> List (Element msg) -> Element msg
rowMarker : Attribute msg
scrollbarX : Attribute msg
scrollbarY : Attribute msg
scrollbars : Attribute msg
shrink : Length
smAndUp : Breakpoint
spacing : Int -> Attribute msg
square : Attribute msg
style : String -> String -> Attribute msg
tablet : Breakpoint
tagForDescription : String -> Description -> String
takeAfterPipe : String -> String
takeBeforePipe : String -> String
text : String -> Element msg
textColumn : List (Attribute msg) -> List (Element msg) -> Element msg
textColumnMarker : Attribute msg
toAttrAttribute : Attribute msg -> Maybe any
toNearbyPair : Attribute msg -> Maybe ( Location, Element msg )
touchDevice : Breakpoint
transitionRaw : String -> Bool -> Attribute msg
transparent : Color
vh : Int -> Length
vw : Int -> Length
white : Color
widescreen : Attribute msg
width : Length -> Attribute msg
widthCss : Length -> String
widthCssIn : LayoutContext -> Length -> String
widthFillFor : LayoutContext -> Int -> String
wrapMarker : Attribute msg
wrappedRow : List (Attribute msg) -> List (Element msg) -> Element msg
xlAndUp : Breakpoint