# Custom components v2

Source: https://docs.streamlit.io/develop/concepts/custom-components/components-v2

Components v2 represents a reimagining of how custom components work in Streamlit. It's designed to unlock new capabilities and dramatically simplify the development experience. To view the command reference, see the [API Reference](https://docs.streamlit.io/develop/api-reference/custom-components).

## Getting started

**[Quickstart examples](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/examples)**: Get started quickly with practical examples showing interactive buttons, data exchange, and complete component implementations.

**[Component registration](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/register)**: Define your component's structure with HTML, CSS, and JavaScript.

**[Component mounting](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/mount)**: Create instances of your component in your app and handle their output.

**[Bidirectional communication](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/communicate)**: Exchange data between your component and Python.

**[State vs triggers](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/state-and-triggers)**: Understand the two communication mechanisms for building interactive components.

**[Theming and styling](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/theming)**: Make your components look great with Streamlit's theme integration and CSS custom properties.

**[Package-based components](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/package-based)**: Build distributable components with TypeScript, external dependencies, and the official component template.

## Migration from v1 to v2

If you have existing v1 components, check out these migration examples:

- [streamlit-bokeh v2 migration](https://github.com/streamlit/streamlit-bokeh/pull/40)
- [streamlit-pdf v2 migration](https://github.com/streamlit/streamlit-pdf/pull/25)

## What's next?

Ready to build your first v2 component? Start with the [Quickstart examples](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/examples) to see practical implementations, then learn about [Component registration](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/register) and [Component mounting](https://docs.streamlit.io/develop/concepts/custom-components/components-v2/mount) to understand the fundamentals.
