ui

Custom SwiftUI view modifiers for reusability

View modifiers encapsulate reusable styling and behavior in SwiftUI. Creating custom modifiers keeps views clean and promotes consistency. I define modifiers by conforming to the ViewModifier protocol, implementing body(content:) that transforms the c

CSS pseudo-classes and pseudo-elements for advanced styling

Pseudo-classes select elements based on state like :hover, :focus, :active, and :visited. I use :nth-child() and :nth-of-type() for pattern-based selection. The :first-child, :last-child, and :only-child target specific positions. Form pseudo-classes

Jetpack Compose declarative UI fundamentals

Jetpack Compose revolutionizes Android UI development with declarative, Kotlin-first approach. Composable functions annotated with @Composable describe UI based on state. The runtime automatically updates UI when state changes using remember and mutab

Django message framework for user feedback

Django's message framework provides one-time notifications to users. I use messages.success(), messages.error(), messages.warning(), and messages.info() to add messages. Messages persist across redirects and are displayed once. I configure message sto

RecyclerView with DiffUtil for efficient lists

RecyclerView displays large datasets efficiently with view recycling. I create a ViewHolder to cache view references and an Adapter to bind data. DiffUtil calculates minimal updates using areItemsTheSame and areContentsTheSame callbacks, improving per

Turbo Streams: partial replace with morphing (less jitter)

When replacing DOM chunks, morphing reduces flicker and preserves focus/selection. If you enable morphing, prefer server-rendered HTML that’s stable and keyed. It’s a subtle but meaningful quality improvement.

Custom ViewGroup for advanced layouts

Custom ViewGroups enable specialized layout behavior beyond standard containers. I extend ViewGroup and override onMeasure() to measure children and onLayout() to position them. measureChild() or measureChildWithMargins() determines child sizes. Layou

SwiftUI animations and transitions

SwiftUI makes animations declarative and automatic. The .animation() modifier animates state changes with built-in curves like .easeInOut, .spring(), or custom timing. Explicit animations use withAnimation {} blocks to scope which changes animate. Tra

ViewComponent for reusable, testable view components

ViewComponent brings component architecture to Rails views. Components encapsulate markup, logic, and tests in Ruby classes. I use ViewComponents for reusable UI elements—buttons, cards, modals, alerts. Components accept parameters via initializer, ke