We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 360058a commit fcc85eaCopy full SHA for fcc85ea
README.md
@@ -131,6 +131,24 @@ Then you can use these helpers from your templates
131
<% end %>
132
```
133
134
+### 5. Using attributes inside your components
135
+
136
+When calling a component you can pass any attribute you like.
137
138
+```eex
139
+<%= button type: :submit do %>
140
+ Submit form!
141
+<% end %>
142
+```
143
144
+Inside the component's template these attributes are going to be available in the `@attrs` map.
145
146
147
+<button type="<%= @attrs.type %>>
148
+ <%= @content %>
149
+</button>
150
151
152
## Configuration
153
154
You can configure where to put the components by editing your application
0 commit comments