Two very different crowds gazed at each other across the White House lawn Saturday as they waited for the Independence Day fireworks on the Mall.

One was tens of thousands strong, casually dressed and wonderfully disorganized, cavorting on the grass around the Washington Monument and splashing happily in the mud where the Beach Boys performed on their island of scaffolding. The other was a smaller group, wearing long dresses, dark blue blazers and regulation white trousers, and they were waiting, only a few yards away, for the president.

The two crowds, it seemed, looked at each with some mystification across the South Lawn as they watched in the gathering gloom for the fireworks. From the White House it was just possible to see the great throng pressing against the high railing. On the lawn White House staff members busied themselves with their own, rather sedate party.

There was no contact across those railings.

Out in the Mall the atmosphere was infectiously joyous. Families spread themselves out on the grass; youngsters danced around happily; children toddled here and there with bright helium balloons tethered to their hair; occasionally a small cloud of marijuana smoke would drift by. There was not a single collar and tie to be seen.

On the other side of the fence the relaxation was a much more studied affair Staff members were instructed to wear their long dress, blazers and white trousers, in obvious contrast to the jeans and T-shirts encouraged by the Carters at last year's White House celebration. Most of the Reagan White House staff wore prim polystyrene boaters, and even their red, white and blue ribbons and ties seemed to have been carefully arranged. White House balloons were flying in formation all over the lawn, safely held lest the precious souvenirs vanish over the trees.

The staffers waited for the president in what seemed to be a campaign mood. It was as if they had been planning this visit for months, hoping to make contact with their great man. To an observer, it didn't seem as if they worked there.

While they waited in high spirits and with considerable excitement for the president's appearance, the crowd on the Mall listened with a different kind of excitement to the Beach Boys, whose music was relayed to an audience stretching from the steps of the Lincoln Memorial to the west front of the Capitol, where a huge gathering was draped across the steps and the lawn waiting for the National Sympohony Orchestra.

There were strange sights to be seen along the Mall. The usual collection of propagandists were doing their best in the bedlam to sell everything from inner peace and tranquility to protein-free diets. One man, inexplicably, sat under a tree listening to the Beach Boys reading something by Franz Kafka. Another sat playing cards. Foreigners wondered around in delight, wondering how they could possibly describe all this when they got back to Rome or Delhi or Limerick.

The crowd, estimated at about 20,000, seemed more interested in merriment than mayhem. Apart from a brief excursion by some Yippies down Pennsylvania Avenue, police reported no significant trouble.

If there had been, it's not likely anyone inside the White House gates would have noticed. Behind the fence was a veritable island of calm. It appears that, in the Reagan years, the presidential family and retainers will adopt an almost royalist stance, cultivating that decent remoteness of the presidency that had been a target for attack by Jimmy Carter.

The White House crowd was quieter than the masses beyond the fence. It was neat and clean-out, shaved and polished and overwhelmingly white. It was organized and resolute, and confident, even suggesting an air of complacency. In a word, Reaganite. As nine o'clock -- and a promised presidential appearance -- approached, it stirred and crowded around the little bandstand, bedecked with paintings of the Statue of Liberty.

Ronald Reagan duly emerged. He gave his guests just the kind of brief homily they probably wanted.

He talked of "the children of our children's children in a century still to come." He told a quick one-liner about the date of the First Lady's birthday (July 6) -- "Her mother delayed a July 4 birth because she didn't want to miss the double-header at Yankee Stadium" -- and within a couple of minutes he was transposed into a photogenic family group on a plastic groundsheet with camera lenses poking toward him from all directions. The family chattered away contendedly, and sang "Happy Birthday," with the president harmonizing within microphone range.

Then, in an instant, he was gone again. The "family group" on the lawn was nothing more than a media event, perfectly controlled as always, through Reagan had had given no indication that it was a performance. As always with Ronald Reagan, the pose was real, or at least permanent.

For the fireworks he retreated to a presidential chair high on the balcony with Frank Sinatra, who had materialized as such people do at such events. The two men sat above the crowd, their grins competing for cheers in the darkness. Occasionally, as the extraordinary fireworks display banged and flashed overhead, the facade of the White House caught the light and gleamed quickly in the night with an eerie glow, silhouetting the presidential party and prompting another communal flash form the polaroids wielded by the staff on the lawn below.

When the fireworks ended the Reagans, the Sinatras and friends vanished from the darkness into the White House for a private reception, leaving the staff on the lawn to look back on another privileged encounter. Outside, the revelers from the Mall swarmed into Pennsylvania Avenue to start their trek home and the carefully manicured and soberly dressed White House staff mingled with them.

But still they seemed a world apart.