Skip to content

Transitions #7

Closed
Closed
@Rich-Harris

Description

@Rich-Harris

A UI library needs a transition system. Ideally it would have the following features:

  • transition code shouldn't be deeply intertwined with the rest of the code (as in Ractive)
  • should facilitate JS or CSS transitions
  • should have zero cost for people who aren't using transitions
  • transition plugins should be easy to write
  • control over order (e.g. Vue has out-in, which is nice – could get even more granular for staggered transitions)
  • nice-to-have – abortable/reversable transitions (e.g. if something is fading out because you toggled visible, and you toggle it again before the fade completes, it'd be great to unfade the same element, rather than letting the fade complete and rendering a new element)
  • some way to access the transitions in such a way that you can do advanced stuff like transitioning one element into another, a la Ramjet

Proposed syntax, following that used by existing directives:

{{#if visible}}
  <div in:fade='{duration:200}' out:fly='{x:100,easing:'elastic'}'>hello!</div>
{{/if}}

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