How to pass a string to a blade component?

As an example there is this component:

resources/views/components/example.blade.php

<div>
    @if($foo === "bar")
        Bar
    @else
        Foo
    @endif
</div>

that I render like

@php
   $foo = "bar";
@endphp
<x-example :foo="$foo" />

what is working.
But to have my code looking cleaner, I want to pass the string directly to the component, but the following I tried are not working:

<x-example :foo="bar" />
<x-example :foo='bar' />
<x-example :foo="'bar'" />
<x-example :foo="'bar'" />
<x-example :foo=""bar"" />