Skip to content

Getting Started

GitHub
  • Tailwind CSS v4 in your app
  • A shadcn-style CLI setup for your framework (components.json or equivalent)
  • Path alias @/* pointing at src/

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
                        

Preview every registry component on the site:

Open the live demo

  1. Add core registry items for your framework (see tabs above).

  2. Import capacitor styles in your global CSS:

    @import '@/capacitor/styles/tailwind-capacitor.css';
  3. Wrap the app with the provider and App shell (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>
  4. Add components such as capacitor-button from the registry when you need them.