01
Overview
CodeLocation formats a file path and optional line and column as a compact source-location chip.
Usage
src/routes/+page.svelte02
When to use
Use when
- Showing a source location beside an error, review comment, or code reference.
Avoid when
- Displaying editable source code.
03
Examples
CodeLocation
Render a compact file, line, and column reference.
04
Props
Name | Type | Default | Description |
|---|---|---|---|
file required | text | ||
line | number | ||
column | number | Rendered only when line is also provided. | |
children | snippet |