Skip to Content
APIansiq

ansiq

ansiq is the recommended first dependency for new users.

If you want to start writing an app before learning the full crate layering, start here.

When to use ansiq

Good fit for:

  • first-time Ansiq users
  • tutorials and examples
  • small and medium applications
  • teams that want one obvious import surface for the common path

Less useful when:

  • you already know you only want one lower-level crate
  • you are doing framework work and want sharper dependency boundaries
use ansiq::prelude::*; use ansiq::{run_app, view};

These two lines cover the common onboarding path.

What is re-exported at the top level

The most common entry points are available directly from ansiq:

  • App
  • RuntimeHandle
  • run_app
  • run_app_with_policy
  • Viewport
  • ViewportPolicy
  • signal
  • computed
  • effect
  • Cx
  • ViewCtx
  • Element
  • IntoElement
  • Rect
  • Color
  • Style
  • view

What the prelude contains

ansiq::prelude::* is intentionally small and high-frequency:

  • App, RuntimeHandle, ViewCtx
  • signal, computed, effect
  • Color, Style, Rect
  • Element, IntoElement
  • common widgets: Box, Block, Text, Paragraph, Input, List, Tabs, Table, ScrollView, Scrollbar, Shell, StatusBar
  • common state types: ListState, TableState, ScrollbarState

It exists to shorten the first app path, not to replace the full API surface.

When to move back to sub-crates

Move back to the individual crates when you want:

  • more explicit dependency boundaries
  • lower-level control
  • crate-specific docs and responsibilities

Useful next pages:

Last updated on