Skip to content

Reactive percentage dimensions #370

@WoodingMP

Description

@WoodingMP

Is there a way to setup an element with percentage based dimensions such that it is reactive if the parent dimensions update? I'm trying to setup a component that is always 50% of its parent but when trying to use the percentages, it seems like it's used on creation but then doesn't update the component width.

I've setup a playground to show what I'm talking about, I know I can setup a computed value that watches a width prop but was just wondering if there are any plans to make this work in future or if there's another way to handle dynamic percentage dimensions, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions