# Getting Started

Overview and documentation for using Font Awesome's JavaScript API.

> Get more control over rendering and features with our Javascript API.

## Access the API

There are two ways to access the API depending on how you've integrated Font Awesome into your project.

### Using Node.js

Before you install the SVG Core Package, make sure you've to set up access to `npm.fontawesome.com`:

- [Configure access](/web/setup/packages.md) to use Font Awesome packages

If you're using Node.js, the `@fortawesome/fontawesome-svg-core` NPM package exports methods that can be used to perform various tasks.

Start by installing the Font Awesome SVG Core package:

```bash
npm install @fortawesome/fontawesome-svg-core
```

Then you can tap into the API from within your app or project:

  **Kit Package:**
  **SVG Icon Package:**

```js
import { library, icon } from '@fortawesome/fontawesome-svg-core'
import { faCamera } from '@fortawesome/free-solid-svg-icons'

library.add(...all)

const camera = icon({ prefix: 'fas', iconName: 'camera' })
```

```js
import { library, icon } from '@fortawesome/fontawesome-svg-core'
import { faCamera } from '@fortawesome/free-solid-svg-icons'

library.add(faCamera)

const camera = icon({ prefix: 'fas', iconName: 'camera' })
```

### In the Browser

Or you can access the API directly in the browser where Font Awesome is available as a global namespace.

```js
var camera = window.FontAwesome.icon({ prefix: 'fas', iconName: 'camera' })
```

## What's the difference between packages?

While all of the API methods are available through both the Font Awesome and the Font Awesome SVG Core packages, each package has a different default configuration.

| Option                                                                                                               |     Font Awesome (JavaScript)     | Font Awesome SVG Core (JavaScript) |
| :------------------------------------------------------------------------------------------------------------------- | :-------------------------------: | :--------------------------------: |
| Automatically replaces `<i>` tags with `<svg>`                                                                       | Yes |  No   |
| Adds CSS to the `<head>` to provide styles for the icons                                                             | Yes | Yes  |
| [Watches the page](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) for icon changes and additions | Yes |  No   |
