Components

An overview of AudioUI components—what they are, how they are organized, and how to choose the right type for your project.

AudioUI provides ready-to-use controls (knobs, sliders, buttons, cycle buttons, piano keys), bitmap-based controls that use your own assets (film strips and image knobs/switches), and primitives for fully custom controls. For design philosophy and performance priorities, see the Introduction. For more context on each type before diving into individual components, see the Vector introduction and Raster introduction.

Components fall into four types: Vector Components, Raster Components, Control Primitives, and View Primitives. The table below compares these types on several criteria so you can see how they differ and choose the right one.

Comparing the four component types

Each column is one component type and links to its documentation. The rows are comparison criteria (attributes):

  • Opinionated: Fixed look-and-feel choices vs full control over appearance (you supply or compose the view).
  • Themable (built-in): Whether the component type supports the built-in theme system (ThemeManager, color, roundness).
  • Resolution-independent scaling: Whether the visual scales without pixelation (SVG) or may pixelate when scaled (bitmap). View primitives are mostly resolution-independent but not always (e.g. bitmap used in a compound view).
  • Default view: Whether the component type provides ready-to-use visuals without supplying assets.
  • Optimization responsibility: Who is responsible for performance and optimization. For view primitives: user for compound views; the primitives themselves are framework-optimized.
  • Dark/light variants: Built-in theme support for light and dark mode; or (raster) props to supply separate dark and light assets with transition managed by the component; or user responsibility / N/A.
  • Completeness: Whether the component type is considered complete or will receive new components, variants, or primitives over time.
AttributeVector ComponentsRaster ComponentsControl PrimitivesView Primitives
OpinionatedYesNoNoNo
Themable (built-in)YesNoNoNo
Resolution-independent scalingYesNo (may pixelate)Depends on viewMostly
Default viewYesNo (requires assets)NoNo
Optimization responsibilityFrameworkFrameworkUserUser (compound views); primitives framework-optimized
Dark/light variantsBuilt-inYes (dark/light assets)N/AUser responsibility
CompletenessWill expand (components, variants, theming)CompleteComplete (parameter model complete)May expand (new primitives)
  • Vector Components (Knob, Slider, Button, CycleButton, Keys) are opinionated: they aim to cover 90% of needs with fixed look-and-feel choices; not everything is customizable. They are themable, scale without pixelation, and have a default view.
  • Raster Components (film strip and image-based controls) are unopinionated: you supply the assets, so any visual representation is possible. They do not use the built-in theme system and may pixelate when scaled.
  • Control Primitives and View Primitives are non-opinionated building blocks: you compose a custom view and are responsible for styling and optimization. View primitives include vector primitives (SVG fragments) and may include other building blocks; use them when you need full control over appearance.

Next steps