Shape layer is vector-based and crisp — perfect for clean UI elements or animated graphics that need to scale without losing quality.
Steps to add a new shape layer
Choose a shape tool from the toolbar — Rectangle, Ellipse, whatever you need. Press Q to cycle through them fast.

Make sure no layer is selected first, then click and drag in your comp viewer to draw your shape. This creates a new layer in your timeline.

Tweak Fill and Stroke in the toolbar, or open the layer’s Contents to edit paths, strokes, and trim paths.

One more thing
If a layer is already selected when you draw, you’ll add a mask instead. Click empty space or press F2 to deselect everything first.
Related how-tos
How to draw masks in After Effects
How to animate a mask path in After Effects
How to add a new solid layer in After Effects
Need more help? Explore all our How-tos in one place.