That’s the behavior of a Boolean prop in any case. You simply define the prop as:
{
props: {
fast: Boolean
}
...
}
And it defaults to false. When you specify the attribute at all in the following template, it is set to true:
<my-foo fast/> <!-- fast is true -->
demo