Building an iOS Animated Toggle with React Aria Components and Tailwind CSS

  Рет қаралды 9,974

Sam Selikoff

Sam Selikoff

Күн бұрын

Пікірлер: 60
@MeonisRP
@MeonisRP 9 ай бұрын
Man, you care about these details so much! ❤
@Isticsek
@Isticsek Жыл бұрын
It always impresses me how thoroughly you delve into all the smallest details to create a UI that looks seamless and perfect! Thanks for these meticulous tutorials that you share with us!
@TouseefKhan-iy9px
@TouseefKhan-iy9px Жыл бұрын
This is a goldmine. Sam, it was extremely helpful, why don't you create a series of videos on react-aria-components?
@florianfiedler4145
@florianfiedler4145 Жыл бұрын
This is the component library I was looking for a long time. Finally something without crazy nesting of unnecessary child-child-child-elements and css rules, unopinionated and therefore integrates great with tailwindcss, which I could not imagine working without anymore. Yet it takes care of all the state-handling, accessibility etc. I will definitely give react-aria-components a try later! Also this was a great demo. I think beginners or people who are just curious can follow along but also for experienced/senior devs like me it was inspiring. Thank you!
@reydman08
@reydman08 11 ай бұрын
Without a doubt, you are a very talented tutor. Thank you for these lessons!
@rjtdas
@rjtdas Жыл бұрын
This is gold, thank you so much. Keep making such modern components videos.
@mryechkin
@mryechkin Жыл бұрын
So good! I've been playing with the new components the last few days as well. As a long-time React Aria user, it's so nice to have these - makes things so much easier compared to the low-level hooks. Also Sam I gotta comment on your production quality - it just keeps getting better and better 👌And Build UI lifetime membership was a no-brainer purchase! Thank you for making it more accessible with the new model.
@jeffsegovia00
@jeffsegovia00 Жыл бұрын
Mindblown here. Thanks Sam! 🎉
@golansoffer6538
@golansoffer6538 Жыл бұрын
Here because of the podcast episode, I had to see it 😅 love it!
@wfl-junior
@wfl-junior Жыл бұрын
The subtle width animation while pressing is awesome, never thought about that
@Omar45
@Omar45 9 ай бұрын
Amazing! Thanks for your high-quality content
@phm703
@phm703 Жыл бұрын
Great video Sam. Fascinating to see all the details you are thinking about and what React Aria Components can do
@meeexy116
@meeexy116 Жыл бұрын
This is so satisfying, gonna be using a whole lot of aria components now
@Shroomade
@Shroomade Жыл бұрын
I'm not a coder or designer but I love watching your videos, like this one and the calculator, chat bubbles, etc. I enjoy great user experience. (edit; apple allows it to be toggled even without hovering over the switch as long as its not released)
@samselikoff
@samselikoff Жыл бұрын
I noticed this! Was wondering if it'd be possible to pull off with Aria. Still I love the immediate feedback of the pressed state so I think it's an improvement. Great eye!
@voinbobar
@voinbobar Жыл бұрын
Another amazing video! The way you code makes things looks simple and easy!
@DEV_XO
@DEV_XO 4 ай бұрын
Amazing Sam!
@laptopuser5198
@laptopuser5198 Жыл бұрын
Very good walk thru. Thanks
@stottelaars
@stottelaars Жыл бұрын
So satisfying to watch, learned a lot about Tailwind! Thanks for sharing ♥
@IkraamDev
@IkraamDev Жыл бұрын
Brilliant video!
@SaadKhanAhmed
@SaadKhanAhmed Жыл бұрын
Your videos are awesome!
@SogMosee
@SogMosee Жыл бұрын
Dude you are sooooo good bro I hope I can one day be as good as you when I grow up
@bobdpa
@bobdpa Жыл бұрын
Another awesome video. Thanks! 🙋‍♂️
@HarshDoes
@HarshDoes 3 ай бұрын
This is crazy 😮🙌
@Benjamin-Chavez
@Benjamin-Chavez 9 ай бұрын
Wow thank you!
@RybaDwudyszna
@RybaDwudyszna Жыл бұрын
Great video. I love your attention to details. Have you tried combining React Aria with Framer Motion? Do you see this solution viable for more complex animations?
@samselikoff
@samselikoff Жыл бұрын
Definitely viable! I expect I'll make a video on it soon :)
@ReactNativeWeeks
@ReactNativeWeeks Жыл бұрын
Look's awesome. I wonder if you could create a follow-up video doing the same with Radix ui to show the difference.
@johnstrickler8412
@johnstrickler8412 Жыл бұрын
Would you give an advantage to React-Aria or Radix-UI for accessibility? Based on the videos, it seems like React-Aria is a bit more robust, but idk if that's just a result of the chosen examples - comparing apples to oranges..?
@icaro_rdp
@icaro_rdp Жыл бұрын
thanks as always for the tutorial, but what about the mix-blend-light ecc.. i saw on twitter? :)
@samselikoff
@samselikoff Жыл бұрын
That solution used transforms. It's more performant but the code is more complex, so here I went with good ol' width and margin. Maybe I could make a follow-up showing it off?
@ammargillani509
@ammargillani509 Жыл бұрын
@@samselikoff Oh for sure please!
@samselikoff
@samselikoff Жыл бұрын
@@ammargillani509 Interested just for curiosity's sake or the performance piece?
@icaro_rdp
@icaro_rdp Жыл бұрын
@@samselikoff would be very interesting, for both performance and use of uncommon CSS classes.
@abe10
@abe10 Жыл бұрын
Hey Sam, great video as usual. Does buildui supports purchase parity?
@samselikoff
@samselikoff Жыл бұрын
Yes, shoot an email to support@buildui.com!
@futuremoe
@futuremoe Жыл бұрын
This is incredible! Thanks for sharing. Can React Aria cause issues with Radix UI if used in the same component?
@samselikoff
@samselikoff Жыл бұрын
Not sure, but I think you'd want to stick to one UI lib per component 👍
@faruksardar8829
@faruksardar8829 Жыл бұрын
How can I set the switch to turn on when the page refreshes for first time, Great video BTW :)
@samselikoff
@samselikoff Жыл бұрын
If you check out the Usage section from the demo here, you should just be able to default the React state to true: buildui.com/recipes/ios-animated-switch
@omkarkulkarni3644
@omkarkulkarni3644 Жыл бұрын
gold
@edhahaz
@edhahaz Жыл бұрын
Are there any libraries for react ios components at the same detail that you go into ?
@Piotrski
@Piotrski Жыл бұрын
You can just use group-data-[selected]:ml-auto instead of group-data-[selected]:ml-3 group-data-[selected]:group-data-[pressed]:ml-2
@samselikoff
@samselikoff Жыл бұрын
Just gave this a shot - seems like CSS can't transition to ml-auto :(
@sadikulhaque1959
@sadikulhaque1959 10 ай бұрын
​@@samselikoff😮😮ikiiqi8j
@DioArsya
@DioArsya Жыл бұрын
ah this is great, thank you. Have u ever tried radix-ui for react-aria alternative?
@samselikoff
@samselikoff Жыл бұрын
Yes I actually have a video on a dropdown using Radix! I love it it's a great library. kzbin.info/www/bejne/pmmmpKKqjLqUqZI
@wfl-junior
@wfl-junior Жыл бұрын
Is it possible to do the same with the Radix UI switch?
@mustafawael8617
@mustafawael8617 Жыл бұрын
Could you make a new videos list of awwwards rebuild or recreate tutorial, with gsap or framer motion, this will be awesome dude 😊
@anthonylaflamme
@anthonylaflamme Жыл бұрын
Wait at 9:43 how do you increase the ml-[number] is it just cut on the edit ?
@samselikoff
@samselikoff Жыл бұрын
Nope that's `r` (replace) with vim!
@kevinbatdorf
@kevinbatdorf Жыл бұрын
Too bad data-pressed doesn't have a way to set a distance point, so that it will only release if, for example, you're 20px outside the switch. That would make it behave even more like Apple's design.
@samselikoff
@samselikoff Жыл бұрын
Agreed, this would be awesome!
@mounis
@mounis Жыл бұрын
@Tysian
@Tysian Жыл бұрын
As far as I know, div element is not allowed to be inside label :(
@samselikoff
@samselikoff Жыл бұрын
Great catch! Updated the recipe to use a span with display block: buildui.com/recipes/ios-animated-switch
@nonstopper
@nonstopper Жыл бұрын
This is great but man I hate how busy tailwind makes a simple React tree look
@brunopanizzi
@brunopanizzi Жыл бұрын
Check out the inline-fold extension, It wraps the class attribute to make it look better
@samselikoff
@samselikoff Жыл бұрын
I meant to press ⌥+Z to unwrap the lines at the end, I usually do that when I'm done styling and working on behavior. It definitely cuts down on the noise. I don't know if you've used Tailwind a lot but personally the nearness of all the classes is such a huge benefit when you want to add or change something that the visual noise just doesn't bother me anymore.
@edhahaz
@edhahaz Жыл бұрын
Jesus man what's wrong with plain css, tailwind looks so bad
Why React Strict Mode breaks your app - on purpose
13:21
Sam Selikoff
Рет қаралды 8 М.
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 6 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 109 МЛН
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 18 МЛН
Avoid premature abstraction with Unstyled Components
17:23
Sam Selikoff
Рет қаралды 12 М.
How to build an Animated Button with React Aria and Framer Motion
29:35
Tailwind-Merge Is Incredibly Useful - And Here's Why!
12:58
simonswiss
Рет қаралды 36 М.
Using CSS Container Queries with Tailwind CSS
25:09
Sam Selikoff
Рет қаралды 25 М.
Веб доступность №3. ARIA
17:34
MaxGraph - cайты как страсть
Рет қаралды 10 М.
Build a NextJS 13 App with Firebase & Tailwind CSS
37:34
Code Commerce
Рет қаралды 45 М.
My New Favorite Next.js 13 UI Library (Radix UI Themes)
18:01
Cooper Codes
Рет қаралды 13 М.
Новый CSS! 2024
18:06
Как пройти в IT?
Рет қаралды 22 М.
Animating a radial gradient with Framer Motion
18:58
Sam Selikoff
Рет қаралды 15 М.
How I animate 3Blue1Brown | A Manim demo with Ben Sparks
53:41
3Blue1Brown
Рет қаралды 548 М.