Skip to content

Commit a252fae

Browse files
committed
update
1 parent b94ffde commit a252fae

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/routes/reference/jsx-attributes

src/routes/reference/jsx-attributes/attr.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ See the[TypeScript](/configuration/typescript#forcing-properties-and-custom-attr
2828

2929
- **Type:** attribute value
3030

31-
Value written to the attribute after the `attr:` prefix is removed.
31+
Value passed to normal attribute serialization after the `attr:` prefix is removed.
3232

3333
## Behavior
3434

35-
- `attr:name={value}` writes the value to the `name` attribute.
36-
- The `attr:` prefix is removed before the attribute is written.
37-
- This is useful when an element expects data through attributes rather than DOM properties.
35+
- `attr:name={value}` writes the value to the `name` attribute after the `attr:` prefix is removed.
36+
- In the DOM runtime, `attr:name={undefined}` or `attr:name={null}` removes the attribute.
37+
- In SSR output, the stripped attribute name and escaped value are written as HTML.
3838

3939
## Examples
4040

0 commit comments

Comments
 (0)