White House press secretary Karoline Leavitt will step down from her position at the end of the month, President Donald Trump has announced.

Leavitt, whom the president called one of his "most trusted aides", will depart from her role to spend time with her young children and family - "a decision I totally understand and respect", Trump wrote in a social media post.

"Karoline will now be one of my top outside advisors, and an influential voice within the Republican Party," he added.

Leavitt, 28, took the job as White House Press Secretary last year - becoming the youngest person to ever have the role. It was not immediately clear who will replace her.

Leavitt welcomed her second child, a baby girl, with husband Nicholas Riccio in May. She also has a two-year-old son. She returned to work from maternity leave last month.

She wrote on X following the president's announcement that her job has been "the honor and adventure of a lifetime".

"Being a mother and welcoming a new baby while working in one of the most demanding jobs in the world has been the most rewarding yet challenging season of my life, to say the least," she wrote.