A sample Ionic React app that demonstrates a social-style news feed with post details, native sharing, and a parallax header effect. Built with Ionic 8, React 19, and Capacitor 8.
- Post list — Card-based feed with image, category, title, author, and summary
- Post details — Full article view with scrollable content
- Share a post — Native share sheet via
@ionic-native/social-sharing(title, image, and source URL) - Parallax header — Collapsing hero image on the details screen using ionic-react-header-parallax
- Type-safe props — Reusable component prop types via @ahmnouira/props (
ItemProps,TitleProps) - Dark mode — System-aware theme via Ionic's dark palette
Existing YouTube demo: Watch on YouTube
| Post list | Post details (hero) |
|---|---|
![]() |
![]() |
| Parallax scroll | Share & actions |
|---|---|
![]() |
![]() |
- Ionic React 8
- React 19
- Capacitor 8
- Vite + TypeScript
- @ionic-native/social-sharing — native share API
- ionic-react-header-parallax — parallax header hook
- @ahmnouira/props — type-safe prop utilities for components
- Node.js 18+
- npm (or yarn/pnpm)
For native sharing on a device, you also need:
- Capacitor native platforms (iOS / Android)
- The Cordova Social Sharing plugin installed in your native project
git clone https://github.com/ahmnouira/ionic-react-social-sharing.git
cd ionic-react-social-sharing
npm install
npm run devOpen the URL shown in the terminal (typically http://localhost:5173).
npm run build
npm run preview # preview production buildnpm run test.unit # Vitest unit tests
npm run test.e2e # Cypress e2e tests
npm run lint # ESLintsrc/
├── components/
│ ├── Post/ # Card UI for a single post
│ ├── PostItem/ # List row linking to post details
│ └── Lorem/ # Placeholder content on details page
├── pages/
│ ├── HomePage/ # Nested routes: list + details
│ ├── PostListPage/ # Feed of posts
│ └── PostDetailsPage/ # Detail view, parallax, share
├── services/
│ └── sharing.service.ts # Native share wrapper
├── mocks/
│ └── posts.ts # Sample BBC-style news data
└── models/
└── post.ts # Post type definition
Tapping the share icon on the post details screen calls share() in sharing.service.ts, which uses the native Social Sharing plugin:
SocialSharing.share("SocialSharingApp", title, file, url);Sharing works on a real device or emulator with the native plugin configured. In the browser, the share action may not be available.
- ionic-react-header-parallax — Parallax header hook used in this app
- @ahmnouira/props — Type-safe prop utilities used for
Post,PostItem, andLoremcomponents



