Guides

Performance

Lazy subpath imports, measured gzip budgets and static pages that ship only what they use.

Subpath imports

Every component family and texel is a separate export. Import texuli/button, texuli/field, @texuli/core/roving — not the package root. The website build already tree-shakes Astro pages to the islands they mount.

// Good — one family per chunk
import { Button } from 'texuli/button';
import { createRovingFocus } from '@texuli/core/roving';

// Avoid — root barrels pull unrelated code
// import { Button } from 'texuli';
// import { createRovingFocus } from '@texuli/core';

Budgets

texuli.budgets.json caps default <package>/* chunks. New lazy subpaths inherit the default; package root barrels are aggregates with a tighter total. Report measured gzip in task write-ups — do not invent splits to game the gate.

Live imports

Live · prefer subpath imports

Lazy-friendly imports

budgets per subpath

  • texuli/button One control family
  • texuli/field Label + error shell
  • texuli/input Text controls
  • @texuli/core/roving Texel, not the root barrel