CWA 2.0 is in alpha: try it, build with it, give feedback. APIs can still change between releases; see Releases.
Composables

Which Composable?

Which CWA composable to use for a layout, a display component, a form, an admin tab, an auth page or a utility.

Every composable the module provides is auto-imported. Pick one by what the file you are writing does.

Decision Table

You are writingUseNotes
A layout (app/app/cwa/layouts/)useCwaLayoutApplies the admin's style classes to the layout's root
A display component (app/app/cwa/components/<Name>/<Name>.vue)useCwaComponentRecommended. Add plugins for collections (withCollection()) and uploaded files (withFile())
A display component that needs one file field without the plugin arrayuseCwaFileFieldThe standalone form of withFile()
A component that only binds a resource, with no pluginsuseCwaResourceLow level. useCwaComponent wraps it
Numbered pagination for a collectionuseCwaCollectionPaginationReturns the page numbers to show
A form (a Symfony Form component)useCwaForm plus one useCwaFormInput per fielduseCwaFormRepeated for a RepeatedType, useCwaFormCollection for a CollectionType
An admin tab (app/app/cwa/components/<Name>/admin/)useCwaResourceManagerTabRequired in every tab
A field in an admin tabuseCwaResourceModeluseCwaResourceUpload for a file field
HTML from the API, with working internal linksuseHtmlContentAlso returns the v-cwa-html directive
A link to a resource's pageuseCwaResourceRoutewithCollection() already returns it as resolveResourceLink
A sort, filter or search bound to the URLuseQueryBoundModel
Your own API request that respects draft and publisheduseCwaResourceEndpoint
A custom login, password reset or email verification pageuseLogin, useForgotPassword, useResetPassword, useVerifyEmail, useResendVerifyEmailThe layer's own auth pages use these

Anything else goes through useCwa(), the service the composables are built on.

useCwaCollectionResource is deprecated. Use useCwaComponent(props, [withCollection()]) instead.