Whether you're building a new closet or just adding more privacy, framing for doors is an important step. The term "framing" here refers to installing the jambs into a rough opening for bypass or bifold doors. These closet doors are not available as prehung units.
A 6-foot-wide closet opening is most common, but you can install closet doors in an opening of just about any width. Sets of bifolds are available in a variety of widths (in multiples of 2 inches) and bypass doors can be cut to any width desired. The standard height is 80 inches (the same as for an entry door). If you have an older home with 9- or 10-foot-high ceilings, this can leave you with unusable space above the doors. Either build shelves with small doors above the closet or custom-make bypass doors that are tall enough to suit your situation.
For this project, you'll need to be skilled at measuring, using a level, cutting, and fastening. Plan to set aside at least half a day for this project—once the rough framing is completed, it will take about three hours to build a finish frame (jambs) for a closet.