How to read these docs
Every API has a page. Pages are linked, so you can follow a type from where it is used to where it comes from.
Component pages
For a component like Button:
- Required parameters have no default. You must pass them.
- Optional parameters have a default. The default is shown in gray.
- Each parameter shows its type. Click the type to learn what it is and how to make one.
- Pictures are rendered from the code below them. That code compiles.
Some functions come in more than one form (overloads). Each form has its own section.
Type pages
For a type like Shape:
- Is a: what this type is a kind of.
- Kinds of: types that are a kind of this one. You can pass any of them where this type is expected.
- How to get one: constructors, functions and ready-made values that give you one.
- Used by: parameters that take this type.
Labels
- Experimental: you need
@OptIn(...)to use it. It may change in the next version. - Expressive theme: the picture uses
MaterialExpressiveTheme. - Gray text with a docs label comes from the library's own docs. It has not been rewritten yet.
Pictures
Pictures are rendered from the shown code with Compose Desktop, in light and dark. They use the Inter font, so the medium and bold weights of the theme show. Your app uses the platform font unless you set one; see the Typography guide.
Search
The search box at the top searches the title, headings and text of every page. Press / to jump to it, the arrow keys to pick a result, and Enter to open it. All words must appear on a page for it to match.
Since labels
A Since 1.10 label marks something added in a recent release: a component, a form of it, or a single parameter. Use it to see what needs a newer library version.
Versions are those of the Compose Multiplatform libraries: material3 for Material, foundation and ui for the building blocks, adaptive for adaptive layouts. Anything already in material3 1.7 or foundation 1.7 (late 2024) has no label. material3 1.10 and 1.11 were only released as alpha versions.