Using Aspects

Aspects can be used to extend Bit by configuring them on your Workspace, Scope and Components. You can also use Aspects from other Aspects you build and use them as an API.

You can use official and community Aspects built by us and the Bit community like the ones below or build your own Aspect.


You can find more available aspects to use here and on the bit.cloud search!

Using Aspects

Aspects can be configured across any Bit config. That means, you can use aspects to extend the functionality of Scopes, Workspaces, Components or any other feature built in an Aspect.

{
  "myorg.dev/my-aspect": {}
}
CopiedCopy

Listing aspects

List all components and the aspects they have configured.

bit aspect list
CopiedCopy

Inspecting aspects

Inspect a specific component` aspects, including metadata and config.

bit aspect get docs/apps-overview
CopiedCopy

Updating aspects

Update components to a newer aspect version.

Update all components using the community-react aspect.

bit aspect update teambit.community/envs/community-react
CopiedCopy

Update components using the community-env aspect under the ui/* namespace.

bit aspect update teambit.community/envs/community-react "ui/*"
CopiedCopy

As an Aspect dependency

Aspects can be used as dependencies by other aspects. See Using dependencies.

Composing aspects into applications

Behind the scenes, Aspects apps are executed with Harmony, Bit's micro-kernel which powers its extensibility.

Running Aspects with harmony:

import { Harmony } from '@teambit/harmony';
import { MyAspect } from '@myorg/dev.my-aspect';

Harmony.run([MyAspect]);
CopiedCopy