Problem of fitting text to box in Vue

This page summarizes the projects mentioned and recommended in the original post on /r/vuejs

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • textFit

    A jQuery-free component that quickly fits single and multi-line text to the width (and optionally height) of its container.

  • So there's a great Javascript library called textfit https://github.com/STRML/textFit that will figure out the correct font size to fit a piece of text into a div. I'd love to wrap that as a Vue component, and I have had only partial results. One problem is that since textfit modifies the DOM objects directly it breaks Vue's reactivity (e.g. changing the text in question won't update), but I'm fairly sure I can plow through that and get that part to work eventually.

  • vue-textfit-experiment

    Exploring a <TextFit> component for Vue3, based on https://github.com/STRML/textFit

  • The bigger problem is that if I place some components are inside v-show (because I'm not ready to bring them into view, for example), then they're in the DOM but hidden, so the geometry isn't established enough to do the text fitting. That part I understand. What I don't know is how to be notified at "the right time", e.g. when a containing element goes from v-show false -> true, which would be an OK time to recompute the textfit. I put together my work in progress at https://github.com/pcherna/vue-textfit-experiment and described my experiments and results in the README.md, would be curious if anyone had any inspiration.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Time-Based CSS Animations

    3 projects | news.ycombinator.com | 5 May 2024
  • Image slideshows are boring. Let's create cubes.

    1 project | dev.to | 5 May 2024
  • Server-side rendered Web Components

    1 project | dev.to | 5 May 2024
  • Ask HN: Web framework for custom character sheets?

    1 project | news.ycombinator.com | 5 May 2024
  • Font Awesome

    1 project | news.ycombinator.com | 5 May 2024