How is a shampoo bar different from soap?
Shampoo pebbles are surfactant-based (a.k.a. soap-free shampoo), which generally means the same ingredients as the liquid shampoo; your hair is used to, just without the water content. They contain a rich concentration of surfactants (cleansing and foaming agents) that help cleanse oil and dirt impurities from your hair. Importantly, these are lower in pH, similar to your hair and scalp.
Hair reacts both to acids and alkalis. Each strand has little scales, and acid makes the scales lie flat, making your hair shiny and smooth. On the other hand, alkali makes the scales stand up, making it hard to comb the hair, causing frizz and tangles more easily.
Many eco-friendly options on the market that claim to be shampoo bars are made with the same process used to produce soaps, created either through a hot or cold soap-making process using oils and sodium hydroxide (commonly known as Lye). These soaps work great to wash your body, but hair is different. Soap shampoos' pH tends to be alkaline, causing some major tangles to the hair. They are no different from regular bar soaps except that they usually contain natural oils targeted for hair.
Washing your hair with soap wouldn't be pleasant. In hard water, calcium and magnesium react with soap and get deposited on hair as the soap rings you may find in the tub—this curdy precipitate leaves hair waxy. A good solid shampoo should do what a good liquid counterpart does—leave hair smooth and refreshed without drying it out or adding too much buildup.