HSK 7–9 grammar · adverb
幸亏
幸亏 — luckily, thanks to
Pattern
+ +
( ) can be left out · other words may come before, between and after
How it works
幸亏 is 幸好's twin and behaves identically, with a touch more emphasis on gratitude to the person or thing that saved the day. The paired clause with 要不然 is very common.
Examples
幸亏有你帮忙,要不然我做不完。
Xìngkuī yǒu nǐ bāngmáng, yàoburán wǒ zuò bu wán.
Thanks to your help I managed — otherwise I'd never have finished.
幸亏走得早,没堵车。
Xìngkuī zǒu de zǎo, méi dǔchē.
Luckily we left early and missed the traffic.
Related

See it in a story
In the app, 幸亏 is underlined wherever it appears in the stories you read, and practised with sentences from them. Free.