Llanelli had chances in the last quarter to sneak a win but they were never consistent or well disciplined enough to turn over a more composed Cardiff.
Llanelli refused kicks at goal in favour of field position before fly half Steve Shingler put over a simple penalty.
Billy McBryde shone in the Llanelli centre but the best break came from Cardiff full back Harry Davies who raced away on a long run before being stopped,
Cardiff took advantage of a line out drive when flanker Johnathan Edwards claimed the try, converted by fly half Gareth Davies.
A yellow for No 8 Jack Condy for a late tackle left the home scrum exposed and when prop Rhys Thomas infringed at a scrum to follow him into the sin bin the penalty try was inevitable.
Another yellow card for what looked a try saving but proved a dangerous tackle by wing Jordan Williams on Ellis Wyn Benham reduced Llanelli to 12 men and it resulted in a second penalty try.
Back to 14 men, Llanelli responded with a close range line out try from hooker Kirby Myhill to leave it 24-8 at the break.
Another close range try from flanker Josh Macleod , converted by Shingler gave Llanelli confidence but a break by centre Jack Phillips put in wing Chris Knight for the Cardiff bonus point.
Llanelli got a late consolation converted try from Owain Morgan to gain a losing bonus point.
Llanelli: Tries: K Myhill, J Macleod, O Morgan; Cons: S Shingler (2); Pens: S Shingler
Cardiff: Tries: Pen tries (2), J Edwards, C Knight; Con: G Davies (2)
Llanelli 24 - 30 Cardiff
courtesy of walesonline