#
, this will come in useful laterx-data
tag to initialise an instance of Alpine. Set the initial value of the tab to whatever tab you want to be displayed by default (assumed to be tab 1)window.location.hash
contains the # segment of the url, including the #window.location.hash
will contain '#password' .tab
to the value of the hash, then that tab will be opened. The ternary in the x-data statement allows a default to be specified. This is the reason we prefixed each of our tab names with #.