# LabeledItem — SvelteKit UI

Package: sveltekit-ui 1.1.94

Page: https://www.sveltekit-ui.com/components/labeled_item

Category: Foundations

Displays a labeled section with an optional tooltip and associated content. Useful for form fields, information displays, or any paired label-content scenarios.

Public component import: `LabeledItem`

## Usage

```svelte
<script>
  // Import the shared stylesheet once in your application's root layout.
  import "sveltekit-ui/style.css"
  import { LabeledItem, TextInput, create_text_input_manager } from "sveltekit-ui"

  const name_input = create_text_input_manager({ label: "Display name", val: "Alex" })
</script>

<LabeledItem label="Profile" tooltip="This name appears on your public profile.">
  <TextInput manager={name_input} />
</LabeledItem>
```

## Properties

### `label`

- type: string
- default: label
- description: The text label displayed next to the content.

### `tooltip`

- type: string or null
- default: null
- description: Optional tooltip text displayed when hovering over the tooltip icon.

### `is_required`

- type: boolean
- default: false
- description: Indicates whether the labeled item is required.

### `is_disabled`

- type: boolean
- default: false
- description: Indicates whether the content is disabled.

### `font_weight`

- type: number
- default: 500
- description: The font weight of the label text.

### `font_size`

- type: number
- default: 1.6
- description: The font size of the label text in rem.

### `color`

- type: CSS color
- default: var(--g4-t)
- description: The color of the label text.

### `disabled_color`

- type: CSS color
- default: var(--g8-t)
- description: The color of the label text when disabled.

### `ml`

- type: number
- default: 0
- description: Margin-left in rem.

### `mr`

- type: number
- default: 0
- description: Margin-right in rem.

### `mt`

- type: number
- default: 0
- description: Margin-top in rem.

### `mb`

- type: number
- default: 0
- description: Margin-bottom in rem.

### `heading_min_width`

- type: number
- default: 20
- description: Minimum width of the label heading in rem.

### `content_min_width`

- type: number
- default: 30
- description: Minimum width of the content area in rem.

### `content_max_width`

- type: number
- default: 50
- description: Maximum width of the content area in rem.

### `children`

- type: snippet
- default: null
- description: The content to be displayed alongside the label.
