# Source: https://docs.streamlit.io/develop/api-reference/custom-components/component-v2-lib

# Component

The [@streamlit/component-v2-lib](https://www.npmjs.com/package/@streamlit/component-v2-lib) package provides TypeScript type definitions and utilities for building Streamlit custom components using the v2 API.

## Installation

Install the package from npm:

```bash
npm i @streamlit/component-v2-lib
```

## Package Information

- **Package name**: `@streamlit/component-v2-lib`
- **Registry**: [npm](https://www.npmjs.com/package/@streamlit/component-v2-lib)
- **Purpose**: TypeScript type aliases and utilities for custom components v2

This package enables type-safe development when creating custom Streamlit components with modern JavaScript frameworks.

## Previous and Next Links

- [Previous: component](/develop/api-reference/custom-components/st.components.v2.component)
- [Next: Component](/develop/api-reference/custom-components/component-v2-lib-component)

## Forum

### Still have questions?

Our [forums](https://discuss.streamlit.io) are full of helpful information and Streamlit experts.