I'm designing a custom headboard for our bed and I want to install electrical into the cubbies I am making in the headboard (primarily for cell phone charging). In my current design, the electrical box would be installed into a cut out 2x4.

I've attached two sketchup models for reference. My primary question is this: Are there any U.S. electrical codes or even best practices I need to be aware of in regards to where and into what material I can install an electrical box? The only thing I could find was that a box can protrude through up to 1/2" of drywall, so I'm wondering if that means that attempting to protrude through a larger (flammable) piece of material like this is against code. If you have any other related advice/caution about running electrical into furniture, that would be welcomed as well. Thanks!

EDIT: In my design, this 2x4 could be changed to a different material, but initially I was trying to keep the structure to 2x4s and plywood for simplicity. I could switch to a thinner material if that would help me to be in compliance.

Front, Side

  • I assume the headboard is firmly mounted to the wall and not easily moved. If not, you may have a problem meeting code with the cabling to the box.
    – bib
    Feb 9, 2017 at 13:43
  • @bib while that wasn't my main question, it was one of my questions. I was l planning on having a 10' wired cord (at least 14 gauge) with a strain relief entering the headboard and then possibly connecting to a surge strip for additional protectio. It will be firmly mounted, but I do want to design it to be moved in the future if necessary. I was also considering some kind of panel mounting plug on the bottom but was worried about having no strain relief
    – StephenH
    Feb 9, 2017 at 13:57
  • 1
    If you want it potentially moveable, I would use armored cable, an MC compatible plug, and a handibox with appropriate connectors instead of a plastic J box. It would, in effect, be a non-UL device rather than part of the permanent wiring. Also, the box it plugs into must be accessible.
    – bib
    Feb 9, 2017 at 14:05
  • I am familiar with most household electrical wiring and practices but I am drawing a blank on an MC compatible plug. Could you provide a link? Thanks
    – StephenH
    Feb 9, 2017 at 14:23
  • One example: vetco.net/products/…
    – bib
    Feb 9, 2017 at 14:31

1 Answer 1


A box can penetrate any material, not just 1/2" drywall.

For non-flammable surfaces you can have the box set back up to 1/4". Ultimately though you want to be flush with the surface.

For flammable surfaces you must be flush with the finished surface.

This is borrowed from a post by @tester101:


Outlet, Device, Pull, and Junction Boxes; Conduit Bodies; Fittings; and Handhole Enclosures

314.20 In Wall or Ceiling. In walls or ceilings with a surface of concrete, tile, gypsum, plaster, or other noncombustible material, boxes employing a flush-type cover or faceplate shall be installed so that the front edge of the box, plaster ring, extension ring, or listed extender will not be set back of the finished surface more than 6 mm (1⁄4 in.). In walls and ceilings constructed of wood or other combustible surface material, boxes, plaster rings, extension rings, or listed extenders shall be flush with the finished surface or project therefrom.

This might also be relevant.

406.4 Receptacle Mounting. Receptacles shall be mounted in boxes or assemblies designed for the purpose, and such boxes or assemblies shall be securely fastened in place unless otherwise permitted elsewhere in this Code.

(A) Boxes That Are Set Back. Receptacles mounted in boxes that are set back from the finished surface as permitted in 314.20 shall be installed such that the mounting yoke or strap of the receptacle is held rigidly at the finished surface.

Not the answer you're looking for? Browse other questions tagged or ask your own question.