Urgent.News

What's breaking now, across thousands of outlets.

Tech

๐Ÿƒ Card RS: Extremely Customizable Card component for WASM frameworks

Salut tout le monde ๐Ÿ‘‹! If there is one layout component that has been re-implemented more times than the <button> , it's the Card. Think about it. Every widget, every dashboard panel, every pricing tier, every shiny glowing glassmorphism element you've ever seen is, deep down, a card. Instead of writing div class="p-6 border rounded-xl shadow-lg bg-white" for the 5000th time, we decided to solveโ€ฆ

Card RS is an extremely customizable, production-ready, accessible Card component for WASM frameworks such as Yew, Dioxus, and Leptos. It aims to eliminate the repetitive implementation of Card layout seen across various widgets, dashboards, and pricing tiers. Card RS provides a clean, composable API for building solid UI surfaces by extracting tedious BEM boilerplate, flexbox wrangling, and ARIA attributes from templates.

The component is designed as a Composable Anatomy, consisting of a Shell (Card), Headers, Content, Footer, and Variants. The Shell is a parent wrapper that renders a clean HTML5 article tag with elevated styling. The Header section contains Title and Description elements, while the Content area accommodates any content. The Footer holds action bars, such as buttons. This structure provides logical boundaries rather than forcing a specific layout.

Card RS offers a Variant matrix that affects surface depth and contrast without rewriting class strings. The Variant enum includes Transparent, Default, Secondary, and Tertiary variants. This matrix enables visual hierarchy and hierarchy logic for interactive pricing selectors. The component is available for all three Rust frontends: Yew, Dioxus, and Leptos.

Card RS prioritizes accessibility by adhering to WCAG guidelines. It renders with ARIA role=article by default and enforces aria_labelledby for structural landmarks, tying them to the Title ID. Users can override the role property if needed. Moreover, Card RS accepts CSS strings eagerly, allowing for customization of cards to fit unique requirements, such as horizontally-aligned flex-row cards with gradient backgrounds.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

๐Ÿ”ด Badge RS: Easy to Use Badge Components for WASM Frameworks

Je vous salue ๐Ÿ‘‹! Every WASM app eventually needs a badge. The little red circle on your notification bell. The green dot on the corner of an avatar.

  • Badge RS simplifies creation of notification counters for Yew, Dioxus, Leptos
  • Handles positioning, sizing, color theming, accessibility out of the box
  • Shape enum ensures badges fit precisely on circular elements

A Service Exists When It Is Declared

The card in a service catalog is a rendering of the manifest, not a table somebody remembers to update. ๐Ÿ‘‹ Hi, I'm Anton - a software engineer working mostly in PHP/Symfony and Go, currently carving aโ€ฆ

  • Service version can be inaccurate due to missing symbol in build process.
  • Service manifest declares components like daemons, handlers, databases, queues.
  • Service declaration should be primary source of truth to avoid discrepancies.

Setting Firefox Bookmark Keywords From an Extension, Without an API for It

I use bookmark keywords all day. Type "jira" in the address bar, hit enter, and you're on the board. Firefox gives a keyword the top "Visit" suggestion in the URL bar, so it's faster than any searchโ€ฆ

  • Firefox supports bookmark keywords in address bar.
  • No API available to set keywords directly from extensions.
  • Passport Containers extension works around limitation.

More from Sunday 27 September โ†’