Confidence among U.S. homebuilders declined in March to a seven-month low as sales eased and construction-materials costs remained elevated.

A gauge of builder sentiment fell to 82 from a February reading of 84, National Association of Home Builders data showed Tuesday. The figure was softer than the median forecast of 84 in Bloomberg’s survey of economists.

The figures show the extent to which higher building-materials costs, particularly lumber, are weighing on builder sentiment. Despite the decline, builders are still upbeat about their prospects as buyer traffic remained steady and sales expectations improved. With limited resale inventory, new housing construction is projected to remain firm.

“Though builders continue to see strong buyer traffic, recent increases for material costs and delivery times, particularly for softwood lumber, have depressed builder sentiment,” Chuck Fowke, chairman of the NAHB and a builder in Tampa, Florida, said in a statement.

The NAHB gauge of current sales fell to the lowest level since August, while the measure of sales expectations in the next six months rose. The index of prospective homebuyer traffic was unchanged from February.