Dynamic doors are one of the most practical uses of SketchUp’s Dynamic Component system: a single component that opens and closes on click, resizes to any dimension, and cuts its own opening through a wall. Building one from scratch teaches you the core DC authoring workflow — attributes, formulas, sub-component hierarchy, and the Interact tool — faster than almost any other exercise. This tutorial walks through every layer of a parametric door in full detail: the fixed door frame, the swinging leaf, a swappable handle, and the cut-opening geometry, all linked so that changing the width or height propagates correctly through every part. As of SketchUp 2026, Dynamic Components are fully supported on desktop; the free web tier can use an existing DC but building and editing the attribute formulas shown below requires a SketchUp Pro or Studio subscription.
The finished component lets you type a new width and height in Component Options and watch the frame, leaf, and wall opening all resize simultaneously. You can trigger the open/close animation with the Interact tool (the hand cursor) from the toolbar, and swapping the handle is as simple as right-clicking the handle sub-component and choosing “Replace with Component.” These three capabilities — resize, animate, swap — cover the practical use cases that come up every day in interior architecture drawings, and each one relies on a different part of the DC attribute system.
Before starting, confirm your version of SketchUp. DC formula authoring is available from SketchUp Pro 2017 onward; the steps below were verified against SketchUp 2024 and 2025. The 3D Warehouse model linked below (Dynamic-Resizable-Rotatable-Door.skp) is a finished reference you can reverse-engineer at any point.
Key Features
- Parametric width and height via LenX / LenZ attributes. The door frame uses two user-exposed attributes,
DoorWidthandDoorHeight, which feed into theLenXandLenZof every sub-component through formulas like=Parent!DoorWidth. Changing one number in Component Options cascades through the entire assembly. The key detail is that SketchUp measures LenX/LenY/LenZ along the component’s own local axes, so you must set those axes deliberately — a component drawn at an angle will show confusing LenX values otherwise. - Open/close animation with RotZ on the door leaf. The door leaf sub-component gets a
RotZattribute toggled between 0° and −90° (or whatever opening angle you want). The Interact tool reads theOnClickevent attribute: settingOnClicktoAnimateCustom("RotZ", 0, -90)makes SketchUp smoothly interpolate the rotation each time the user clicks the door. You can adjust the step count to control animation speed. The animation attribute lives on the leaf sub-component, not on the parent — keep that hierarchy clear or the formula references break. - Pivot-correct axis placement is mandatory. SketchUp rotates a component around its own axis origin, not its bounding box center. If you create the door leaf geometry and then set RotZ without moving the axes, the door spins around the middle of the leaf instead of the hinge edge. The fix is to open the leaf component, use Change Axes (right-click context menu), and snap the origin to the hinge-side vertical edge of the door leaf. Once the axes are correct the RotZ formula works as expected. This is the single step that causes the most confusion for people building their first door DC.
- Cut Opening for single-face walls. Enabling Glue to Any and Cut Opening on the frame sub-component (the one whose face sits flush against the wall) causes SketchUp to automatically punch a hole when the component is placed against a face. The cut geometry follows the frame’s bounding box, so as the frame resizes with DoorWidth/DoorHeight, the opening resizes too — no manual editing needed. Important limitation: Cut Opening only cuts one face at a time. It will not punch through a thick wall or a wall built from two parallel faces. For those situations you need an extension such as FlexTools WallCutter.
- Swappable handle sub-component. The handle is a separate nested component with no size formulas. Keeping it formula-free means you can right-click it and choose Replace Selection with Component (shown in the DC panel as the Swap attribute) to swap in any handle from the 3D Warehouse without disrupting the rest of the assembly. The tutorial places the handle last for exactly this reason: attaching size formulas to a part you intend to swap creates broken references when the replacement has different attribute names.
- Parent component as the container and sizing authority. The parent component holds
DoorWidthandDoorHeightas the single source of truth. Both the frame and the door leaf reference these with=Parent!DoorWidthand=Parent!DoorHeight. This means the user only ever edits two numbers regardless of how many sub-components are inside. When you add a sidelight or transom later, you only add new formulas that read the same two parent attributes — the user-facing interface stays unchanged.
How to Install and Use
- Download the reference model. Grab Dynamic-Resizable-Rotatable-Door.skp from the 3D Warehouse. Open it in SketchUp Pro 2022 or later. Before doing anything else, right-click the door and choose Dynamic Components > Component Attributes to see how the finished attribute tree is organized.
- Create the door frame component. Draw the frame profile (top rail, two side jambs, sill) as a group, then make it a component named
DoorFrame. Open its attributes panel and addLenXwith the formula=Parent!DoorWidthandLenZwith=Parent!DoorHeight. Set Glue to Any and enable Cut Opening in this component’s settings. Place it against a wall face and verify the wall cuts correctly before building the rest of the assembly. - Create the door leaf component. Inside the parent, draw the door leaf rectangle slightly smaller than the frame opening (account for clearance — typically 3–5 mm on each side). Make it a component named
DoorLeaf. Before adding any attributes, open the component and use Change Axes to move the origin to the hinge-side vertical edge at the bottom. This is the pivot point. Close the component and addLenXas=Parent!DoorWidth - 0.01(subtract clearance in meters) andLenZas=Parent!DoorHeight - 0.005. - Add the RotZ animation attribute. Still on the DoorLeaf component, add a new attribute named
RotZwith a default value of0. Then add anOnClickattribute with the formulaAnimateCustom("RotZ", 0, -90). Switch to the Interact tool (toolbar, or press I), hover over the door — the cursor changes to a hand — and click. The door should swing open. Click again to close. If it rotates around the wrong point, go back and recheck the axes position from step 3. - Create the parent container component. Select both DoorFrame and DoorLeaf, right-click, and Make Component — call it
DynamicDoor. Open its Component Attributes and add two user-visible attributes:DoorWidth(type: units, default: 0.9 m) andDoorHeight(type: units, default: 2.1 m). Make sure both are set to display in Component Options (check the eye-icon column). Test by selecting the parent, opening Component Options, and typing a new width. All parts should resize together. - Add the handle. Download or model a door handle component. Insert it into the parent (not inside DoorLeaf — keep it at the parent level or nested in DoorLeaf without size formulas). Position it at a realistic height (~1.05 m from the floor). Do not add LenX/LenY/LenZ formulas to the handle. To swap it later: right-click the handle sub-component, choose Replace Selection with Component, and pick any new handle model.
- Save to Local Collection for reuse. Go to File > Save As Template or simply save the .skp to your Components folder. In future projects, access it through the Components panel search. Because all sizing is formula-driven, every instance you place can be given independent width and height through its own Component Options dialog without affecting other instances in the same model.
Pro Tips
- Use a thickness offset formula to keep molding proportional. If you want the door frame molding width to scale relative to the door width, add a formula like
=Parent!DoorWidth * 0.08on the molding sub-component’s LenX. Hard-coding a fixed molding width looks wrong on narrow or unusually wide doors. Proportional formulas take 30 seconds to set up and eliminate that problem permanently. - Test the animation at 45° increments before finalizing. The AnimateCustom formula interpolates linearly between the start and end angles. If you later decide a 75° opening looks better in a tight corridor, just change the end value in the formula from
-90to-75. No geometry changes needed. Check both the open and closed positions for clearance against adjacent walls or furniture before finalizing the component for a project. - Lock the Z position of the door leaf to prevent accidental drift. When the door leaf resizes, SketchUp scales from the component origin. If your origin is at the bottom-hinge corner, the top of the door grows upward correctly. But if someone moves the component axes later, the door will grow in the wrong direction. Protect against this by adding a
Zattribute set to0(fixed) and aYattribute set to0as well — locking position attributes prevents the sub-component from drifting if another author edits the file. - For double doors, mirror with a negative LenX scale. Build a single door leaf, then create a second instance as a sub-component inside the parent. Add a formula
LenX = -1 * DoorLeaf!LenXon the second leaf. SketchUp interprets a negative scale as a mirror. Position the second leaf’s origin at the opposite hinge edge. Both leaves now animate symmetrically from a single OnClick event on the parent. - Export to 2D with the door in its open position for plan drawings. Before exporting a floor plan, open the door to 90° using the Interact tool, then use Camera > Standard Views > Top and export a 2D vector. The exported plan will show the door arc in the open position, which is the convention in architectural drawings. Switch it back to closed after export — a Scene saved at 90° open is handy for this.
System Requirements
- SketchUp version: Pro 2017 or later for DC formula authoring; Pro/Studio 2022+ recommended (API improvements reduce formula errors on complex assemblies). Free web tier can use but not author DCs.
- Operating system: Windows 10/11 or macOS 11 (Big Sur) and later.
- Extensions required: None for basic open/close and resize. FlexTools WallCutter (or similar) needed if you want cut-opening on thick or double-faced walls.
- Hardware: No special requirements — DC formulas are evaluated by the SketchUp core engine, not the GPU.

Tiếng Việt