The guide is being migrated; some links to the API reference may be missing. Use the search bar in the API reference.

Component

Components are the basic graphical building blocks of Vico. There are several built-in implementations, which cover most use cases:

  • TextComponent draws text. It supports font customization, line breaks, rotation, backgrounds, and more.

  • ShapeComponent draws Shapes, for which you can define a color, a stroke, and more.

  • LineComponent, which is a type of ShapeComponent, draws horizontal and vertical lines.

  • LayeredComponent draws two Components on top of each other and lets you specify their spacing.

Learn about Component creation in Compose.

Last updated