Make Your Own Svelte Component Library

  Рет қаралды 20,352

Joy of Code

Joy of Code

Күн бұрын

Пікірлер: 53
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
🔴 Patreon: www.patreon.com/joyofcode 💬 Discord: joyofcode.xyz/invite
@mumk
@mumk Жыл бұрын
Although I might not have time for Svelte videos, I wanted to express how brilliant the thumbnail is. It's so vibrant, vivacious and surreal.. good job for those awesome thumbnails! I enamored it.
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Thank you! 😄
@chychywoohoo
@chychywoohoo Жыл бұрын
Probably just using midjourney
@SarcevicAntonio
@SarcevicAntonio Жыл бұрын
Really awesome video as always! Remember, you can also have a default slot, so you don't have to wrap the content for example 😊👍
@pineappleseltzer9450
@pineappleseltzer9450 Жыл бұрын
I get that the point is to teach us how to think about components (and it's awesome!), but in the case of accordions, you can also use the html tags details and summary, which builds in the open/close logic. I don't think you can animate the transition yet, though.
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
That's a good point but this gives you more control.
@henil0604
@henil0604 Жыл бұрын
great timing man! Just 10 hours ago i was thinking to ask you about this on discord 😅
@すべてに興味を失う
@すべてに興味を失う 11 ай бұрын
It could be nice to redo the same exercise with runes ^^
@mr_clean575
@mr_clean575 7 ай бұрын
Agreed, we definitely need this ❤
@ScriptRaccoon
@ScriptRaccoon Жыл бұрын
Very cool idea to implement it like this. The API is very nice to use, all the logic about IDs and selecting them is "hidden". Just one small suggestion: you didn't need the close class for the arrow. When the open class is removed, the transition is automatically played backwards.
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
That's what I also thought and I tried it before but it doesn't work.
@ScriptRaccoon
@ScriptRaccoon Жыл бұрын
​@@JoyofCodeDev It works when you put the transition property on the button, not just in the open class. Here is a REPL - I paste the code since links are not allowed. let rotated = false; rotated=!rotated} class:rotated> 🍓 button { transition: transform 100ms ease-in-out; border-radius: 50%; padding:0.5rem; } .rotated { transform: rotate(90deg); }
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
@Script Raccoon Thank you for pointing out my mistake! 😄
@leboyoyo
@leboyoyo Жыл бұрын
Once Again, Areally great tuto! Will make a video covering Unit test for this kind of component for exemple?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Yeah! 😄
@justingolden21
@justingolden21 Жыл бұрын
Awesome tutorial and it was neat to see those reference sites and learn about the context API in a very simple manner! It's "collapse" as someone pointed out lol, but it happens. I think to avoid the TS underlines, it might be best to not set the script type to TS until that part of the video. Also, you mentioned accidently typing single = instead of double/triple ===. When you read them outloud/think of them, read "=" as "is assigned to" and "==" as "is equal to" and "===" as "is strictly equal to" and then you'll never make the mistake ;) (I'm sure you know the difference, but it helps to change the voice inside your head as you read it lol)
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
I type fast and ligatures make it even worse to find the problem. 😂
@rahulxcr
@rahulxcr Жыл бұрын
Thanks, this is really a great tutorial.
Жыл бұрын
Great content! Thank you!
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
You're welcome! 😊
@justingolden21
@justingolden21 Жыл бұрын
Maybe out of scope for this, but a follow up on publishing as a npm package would be awesome!
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
I want to cover testing components and publishing in a future video.
@すべてに興味を失う
@すべてに興味を失う Жыл бұрын
@@JoyofCodeDev this could be great 🥳
@O1O1OO1
@O1O1OO1 Жыл бұрын
Yes that would be great, publishing and tips on all the stuff to consider when using these components in vanilla JS projects vs Svelte Projects.
@jadelily18
@jadelily18 11 ай бұрын
would love to see this :D
@TheMaxiviper117
@TheMaxiviper117 Жыл бұрын
@34:12 how do you get the variable autocomplete?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
I'm using the CSS Var Complete extension but I should make a video on it.
@HarrisonPage-wd3vz
@HarrisonPage-wd3vz Жыл бұрын
great work man
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Thank you! 😄
@azag777
@azag777 Жыл бұрын
Great content!
@tomich20
@tomich20 Жыл бұрын
Thanks for the content . Question, I got lost at context stuff.. if you are using the store.. why not just send the data through it instead of all the context complex magic? Still don't understand it. Thanks again, and please teach us how to export the components so we can use it in plain html
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Using context is more suited for passing data between components while stores are great for managing global state.
@Hugos68
@Hugos68 Жыл бұрын
I think you meant 'collapse' instead of 'colapse', still great video non the less, always wondered about svelte fragments, also never used the context api but defenitely will after this video.
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
Thank you! 😄
@argonjs
@argonjs Жыл бұрын
Awesome 🔥
@namthanhnguyen2554
@namthanhnguyen2554 Жыл бұрын
Thank youuuu
@lungarella-raffaele
@lungarella-raffaele 5 ай бұрын
Anyone gets 'Cannot find module $lib/components/accrdion or its corresponding type declarations.`
@casper5314
@casper5314 Жыл бұрын
sickkkkk
@justingolden21
@justingolden21 Жыл бұрын
HOW IS HE STILL NOT AT 10K SUBS? (also sorry for comment spam lol)
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
It's close! 😄
@justingolden21
@justingolden21 5 ай бұрын
@@JoyofCodeDev Now get to 30k 😎
@すべてに興味を失う
@すべてに興味を失う Жыл бұрын
34:40 you are ^^
@aer1al0
@aer1al0 Жыл бұрын
Next step: Exporting this as HTML Custom Web Elements to support framework agnostic components? 😅
@O1O1OO1
@O1O1OO1 Жыл бұрын
Yes please!! At lest vanilla JS components, since Custom Web Element support is currently a bit weak in Svelte
@thederpykrafter
@thederpykrafter 10 ай бұрын
why does the console show true for colapse? isnt it set to false? mine shows false lol
@werrutkyupnext
@werrutkyupnext Жыл бұрын
9:18 💀
@DeviantFox
@DeviantFox 10 ай бұрын
Man... watching this and knowing svelte 5 is coming, this is going ot be out of date... Hopefully you make a new one when it's time.
@nzaeroax
@nzaeroax Жыл бұрын
where is the sample bro ?
@JoyofCodeDev
@JoyofCodeDev Жыл бұрын
The post with the example is in the description.
@greendsnow
@greendsnow Жыл бұрын
No HeadlessUI support, no Svelte. Also Vue 3.2 is faster than Svelte...
@O1O1OO1
@O1O1OO1 Жыл бұрын
HeadlessUI for Svelte seems getting traction again. And hey, that's not the purpose of this video. It's about building your own components ; )
@Wurstfinger-rl1zi
@Wurstfinger-rl1zi 6 ай бұрын
skill issue
Using The Svelte Context API With Stores
10:17
Joy of Code
Рет қаралды 14 М.
The Anti Component Library
10:35
Huntabyte
Рет қаралды 48 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Use Svelte 5 Snippets To Reuse Markup Without Creating Components
17:41
Master The Svelte Context API
18:07
Joy of Code
Рет қаралды 9 М.
Best UI Library for Svelte
16:13
Huntabyte
Рет қаралды 111 М.
Svelte makes Drag And Drop API easy!
15:08
Antonio Sarcevic
Рет қаралды 23 М.
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 733 М.
I Tried Every Svelte UI Library
20:57
Joy of Code
Рет қаралды 54 М.
Protect SvelteKit Routes with Hooks
21:10
Huntabyte
Рет қаралды 61 М.
Svelte Is Good For Beginners
9:28
ThePrimeTime
Рет қаралды 85 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН