Getting Started
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/tailwind-capacitor`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/tailwind-capacitor/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Prerequisites
Section titled โPrerequisitesโ- Tailwind CSS v4 in your app
- A shadcn-style CLI setup for your framework (
components.jsonor equivalent) - Path alias
@/*pointing atsrc/
Registry install
Section titled โRegistry installโCore registry items, then any component slug.
-
npx shadcn-vue@latest add https://raw.githubusercontent.com/Cap-go/tailwind-capacitor/9791d43d67279d7725d6a1f7865ff10deaf36ba5/public/r/capacitor-tailwind.json -
npx shadcn-vue@latest add https://raw.githubusercontent.com/Cap-go/tailwind-capacitor/9791d43d67279d7725d6a1f7865ff10deaf36ba5/public/r/capacitor-provider.json -
npx shadcn-vue@latest add https://raw.githubusercontent.com/Cap-go/tailwind-capacitor/9791d43d67279d7725d6a1f7865ff10deaf36ba5/public/r/capacitor-shared.json -
npx shadcn-vue@latest add https://raw.githubusercontent.com/Cap-go/tailwind-capacitor/9791d43d67279d7725d6a1f7865ff10deaf36ba5/public/r/capacitor-icons.json -
npx shadcn-vue@latest add https://raw.githubusercontent.com/Cap-go/tailwind-capacitor/9791d43d67279d7725d6a1f7865ff10deaf36ba5/public/r/capacitor-button.json
Live demo
Section titled โLive demoโPreview every registry component on the site:
-
Add core registry items for your framework (see tabs above).
-
Import capacitor styles in your global CSS:
@import '@/capacitor/styles/tailwind-capacitor.css'; -
Wrap the app with the provider and
Appshell (Vue example):<script setup>import TailwindCapacitorProvider from '@/capacitor/vue/shared/TailwindCapacitorProvider.vue'import App from '@/capacitor/vue/components/App.vue'import Page from '@/capacitor/vue/components/Page.vue'</script><template><TailwindCapacitorProvider><App theme="ios" class="safe-areas"><Page><RouterView /></Page></App></TailwindCapacitorProvider></template> -
Add components such as
capacitor-buttonfrom the registry when you need them.