Skip to content

Conversation

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Oct 17, 2025

Resolves #446 in combination with #4322

What is the current behavior?

The Packages & CDN guide has some information on how to get started with Angular, React and Vue but these sections are incomplete. For example, we cover how to add React to an existing app here but it is missing a lot of steps that are documented in the guide here. It doesn't make sense to have the same information in two places.

What is the new behavior?

This PR updates the Packages & CDN guide to redirect out to the Quickstart & Add to Existing guides for the packages, but keeps the CDN content in the CDN guide. React was the only framework that already had an Add to Existing guide, so this also adds Add to Existing guides for Angular & Vue and moves the content from the CDN to those.

Ionic Packages & CDN Guide Changes

Below is a before & after of the CDN page (right-click and open the image in a new tab to see the images larger):

Before After
production view of packages and cdn page branch view of packages and cdn page

Add to Existing Guide Changes

React

Angular

Vue

Important

The React URL has changed. I set up redirects for this but it will break the JP docs if they are not updated right after. I could leave the old file to remove after the JP docs are updated if desired.


Co-authored-by: feranmiodugbemi <87916077+feranmiodugbemi@users.noreply.github.com>

@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-docs Ready Ready Preview Comment Nov 12, 2025 5:29pm

</div>
)}
{props.ionicon && <ion-icon name={props.ionicon} className="Card-ionicon"></ion-icon>}
{props.iconset && (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched the repository and iconset was not used anywhere so I stole this property to make my card that shows icon + icon:

Image

}

docs-cards:has(docs-card:only-child) {
grid-template-columns: 1fr 1fr;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed so that the JavaScript card does not stretch the entire width of the row.

"destination": "/docs/react/add-to-existing"
},
{
"source": "/docs/:version(v7)/react/adding-ionic-react-to-an-existing-react-project",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not include v6 here as the guide did not exist in v6.

#### 1. Install the Packages

```bash
npm install @ionic/vue @ionic/vue-router vue-router
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @ionic/vue-router and vue-router installs are here instead of under "Set up Routing" like the React guide because @ionic/vue errors without vue-router being installed and it seemed weird to only install it without also including @ionic/vue-router.

Comment on lines +56 to +67
{
"input": "node_modules/@ionic/angular/css/core.css"
},
{
"input": "node_modules/@ionic/angular/css/normalize.css"
},
{
"input": "node_modules/@ionic/angular/css/structure.css"
},
{
"input": "node_modules/@ionic/angular/css/typography.css"
}
Copy link
Member Author

@brandyscarney brandyscarney Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically we do not need normalize, structure or typography but some of the components will not look like they do in the docs without them so I added them here. I can remove if we would prefer just adding a note / link about adding them if needed.

Update `src/app/app.html` to the following:

```html title="src/app/app.html"
<ion-button>Button</ion-button> <ion-datetime></ion-datetime>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These being on the same line was done by the docs linter.


This guide covers how to add Ionic React to an existing React project. If you're looking to start a new project from scratch, check out the [Ionic React Quickstart](/docs/react/quickstart.md) guide. For an overview of how Ionic React works with React, including version support and tooling, check out the [Ionic React Overview](/docs/react/overview.md).

:::tip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we note somewhere that this follows adding to a React app created with Vite?


This guide covers how to add Ionic Vue to an existing Vue project. If you're looking to start a new project from scratch, check out the [Ionic Vue Quickstart](/docs/vue/quickstart.md) guide. For an overview of how Ionic Vue works with Vue, including version support and tooling, check out the [Ionic Vue Overview](/docs/vue/overview.md).

:::tip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we note somewhere that this follows adding to a Vue app created with Vite?


Update `src/App.vue` to the following:

```vue title="src/App.vue"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vue styling will not show up until this is merged: #4311

@brandyscarney brandyscarney marked this pull request as ready for review November 12, 2025 17:48
@brandyscarney brandyscarney requested a review from a team as a code owner November 12, 2025 17:48
@brandyscarney brandyscarney requested a review from gnbm November 12, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Ionic from npm without framework

2 participants