template syntax for html attribute helper #16053
Closed
tszyuloveyou
started this conversation in
Ideas
Replies: 1 comment
-
There is no reason to introduce additional syntax for attributes, it's just this: <input type="text" disabled={submitting} /> And for classes there already is object/array syntax. <a class={[
'btn', { 'btn-primary': hasPermission(), 'btn-secondary': !hasPermission() }
]}> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I see laravel blade has
@disabled
,@readonly
,@class
,@style
Will us has
{#disabled (bool)}
,{#readonly (bool)}
,{#hiddle (bool)}
,{#class (object)}
,{#style {object)}
html attribute helper for future?https://laravel.com/docs/12.x/blade#conditional-classes
EG:
<input type="text" {#disabled submitting} ...... />
EG2:
<a {#class {'btn', 'btn-primary': hasPermission(), 'btn-secondary': !hasPermission()}}
Beta Was this translation helpful? Give feedback.
All reactions