Modules and capabilities·/docs/views-and-tsx

Views, components, and .lp syntax

Lakeport splits view authoring into a typed core element model, unstyled accessible primitives, optional copy-owned Tailwind component templates, and native virtualization and motion packages.

Core package map

Package
What it provides
lakeport-style
StyledView, StyledApp, semantic HTML and form elements, accessibility attributes, and compile-time CSS class checks
lakeport-primitives
Unstyled accessible primitives (Dialog, Popover, Select, Menu, Tabs, Accordion, Toast, Sheet, Command, FocusScope) with verified behavioral laws
Tailwind UI templates
Optional 34-component OKLCH Tailwind kit (cn, cva, copy-source CLI) scaffolded via --template tailwind
lakeport-virtual
VirtualList and VirtualGrid with variable heights, sticky headers, chat scroll anchoring, and native navigation chrome
lakeport-native-motion
60/120Hz spring animations and swipe gestures running directly on the native platform UI thread
lakeport-router
Typed routes, compiler-checked link matching, document titles, <a href>, and static-site pre-rendering
lakeport-effects
Typed side-effect commands and offline retry queues
lakeport-json & lakeport-xml
JSON and XML parsers, serializers, and typed decoders
lakeport-signals & lakeport-memo
Fine-grained reactive updates and memoized derived values

Semantic elements, forms & links in .lp

.lp markup compiles directly to typed Lean StyledView definitions with line-preserving source maps so errors point back to the exact tag or expression.

The element model covers the standard semantic web and native control vocabulary:

•
Containers & semantic structure: div, section, main, header, footer, nav, aside, article, ul, ol, li, table, thead, tbody, tr, th, td, h1 through h6, p, span, pre, code, dialog, img, svg, and <native-view>.
•
Links & navigation: <a href="/docs" target="..." rel="..."> integrated with LakeportRouter on Web and deep links on native.
•
Typed form controls: <form>, <label>, <button>, <input> (text, password, email, number, search, checkbox, radio, range, date, file), <textarea>, and <select>. On iOS, macOS, and Android, interactive controls mount real OS widgets (UITextField/UITextView, NSTextField/NSTextView, EditText) styled by Lakeport's native CSS engine.
•
17 typed event handlers: onClick, onInput, onChange, onSubmit, pointer, key, focus, blur, scroll, touch, pan, pinch, and swipe events.

6-target accessibility (A11yProps)

Lakeport defines typed accessibility properties (role, aria-label, aria-describedby, aria-expanded, aria-selected, aria-checked, aria-live, aria-modal, focus management, focus traps, and roving tabIndex).

Each platform host projects those attributes onto its native accessibility tree: Web ARIA, iOS VoiceOver (accessibilityElements), macOS NSAccessibility, Android TalkBack, Linux GTK4/AT-SPI, and Windows UIA.

lakeport-primitives & Tailwind component templates

Rather than rebuilding keyboard navigation and focus trapping in every screen, compose from lakeport-primitives with your own CSS, or scaffold the optional Tailwind component kit:

•
lakeport-primitives is completely unstyled and works with plain CSS, CSS modules, or Tailwind. It provides Slot/asChild, Controllable, Presence, PortalStack, DismissableLayer, FocusScope, RovingFocusGroup, Popper, Dialog, AlertDialog, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu, Select, Tabs, Accordion, Collapsible, Switch, Checkbox, RadioGroup, Toggle, ToggleGroup, Slider, Progress, Separator, Avatar, ScrollArea, Toast, Sheet, and Command, with focus and state laws verified by the compiler.
•
Tailwind component templates (--template tailwind) wrap those primitives in 34 OKLCH light/dark styled components (cn token conflict resolution and cva variants) that you copy directly into your repo and own as standard .lp source files.

Virtualized lists & 120Hz motion

For long feeds, tables, and fluid mobile interactions:

•
VirtualList & VirtualGrid (lakeport-virtual) materialize only visible rows plus overscan, supporting variable item heights, sticky section headers with push-off, deduplicated onEndReached pagination, and exact prepend scroll anchoring for chat feeds.
•
lakeport-native-motion runs damped spring physics, cubic-bezier curves, decay physics, and rubber-band clamping directly on the native platform UI thread at 60/120Hz so dragging sheets and swiping back stay fluid without blocking on application logic.