Results 1 to 2 of 2

Thread: React and DIV Transition

  1. #1

    Thread Starter
    Fanatic Member clarkgriswald's Avatar
    Join Date
    Feb 2000
    Location
    USA
    Posts
    769

    React and DIV Transition

    I have a react app that contains something like this :

    HTML Code:
    <div id='button'>
         <div id='menu'>
              <div id='menu-item'>Item 1</div>
              <div id='menu-item'>Item 2</div>
              <div id='menu-item'>Item 3</div>
         </div>
    </div>
    The 'menu' div is only rendered when the state is set appropriately (the button click toggles a 'showMenu' state variable) - if showMenu, I would like to make the 'menu' div appear to dropdown from its current coordinates. Been playing with key-frames, but can't quite get what I want. I am just looking for a nice transition as opposed to an instant visibility change.

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,377

    Re: React and DIV Transition

    Personally I'd use an existing component that has that functionality... will be a lot easier than trying it yourself. I've seen several component libraries out there that have transitional animation capabilities in them.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width