Nib provides a set of types, dataclasses, and enums used to configure views, styling, animations, and layout. All types are importable directly from the nib module.

import nib

color = nib.Color(hex="#4287f5")
font = nib.Font.system(16, nib.FontWeight.BOLD)
animation = nib.Animation.spring()

Type Classes

Type Description
Color Color values -- named, hex, RGB, RGBA
Font Font configuration -- system fonts and custom font files
Animation Animation timing curves and spring configurations
Transition View appearance/disappearance animations and content transitions
TextStyle & AttributedString Rich text styling and multi-segment attributed strings
Offset & CornerRadius Position offsets and per-corner radius configuration

Enum References

Page Enums
Style Enums ButtonStyle, ButtonRole, BorderShape, ControlSize, LabelStyle, ToggleStyle, TextFieldStyle, EditorStyle, PickerStyle, ProgressStyle, FormStyle
Alignment Enums HorizontalAlignment, VerticalAlignment, Alignment, ScrollAxis
Image Enums ImageRenderingMode, SymbolScale, SymbolRenderingMode, ContentMode, TruncationMode, TextCase
BlendMode All layer blending modes