# Fit Value
The Text Fitting system automatically adjusts the font size, weight, and line height of text elements so that they fit within their containers. This dynamic resizing is especially useful for responsive layouts where available space may vary, ensuring that content is always legible.
### Basic Usage
To enable automatic text resizing, add the `data-value-fit="true"` attribute to your element. For numeric values, this is all you need - the system will automatically adjust the element's
font size and weight to fit the container width. Text content requires additional configuration (see Text Fitting below).
$1,000 XXXLarge
$1,000,000 XXXLarge
$1,000,000,000 XXXLarge
Fit ValueNumber Formatting
$1,000
$1,000,000
$1,000,000,000
### Text Fitting
When fitting text content, you must specify a maximum height constraint using the `data-value-fit-max-height` attribute (in pixels).
This ensures text content stays within both width and height constraints while maintaining readability through
automatic font size and weight adjustments.
Hello. This is a really long headline that will need to adjust significantly to fit within its container space and look good in a layout. XXXLarge
Hello. This is a medium length headline that fits nicely. XXXLarge
Hello. XXXLarge
Fit ValueText Formatting
Hello. This is a really long headline that will need to adjust significantly to fit within its container space and look good in a layout.
This is a medium length headline that fits nicely.
Hello.
Previous
[Format Value Format numbers and values with consistent styling](/framework/docs/format_value)
Next
[Content Limiter Change font size when content overflows to fit within the container](/framework/docs/content_limiter)