Skip to content

Instantly share code, notes, and snippets.


laracasts/index.html Secret

Last active Jun 9, 2021
What would you like to do? - "Named Slots in a Nutshell" source code.
<!DOCTYPE html>
<title>My App</title>
<link rel="stylesheet" href="">
<div id="root" class="container">
<template slot="header">
My Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore cum, delectus quas possimus sint quisquam et, quam quia omnis, autem quae ipsa qui ex earum facilis sequi quidem mollitia culpa?
<template slot="footer">
<a class="button is-primary">Save changes</a>
<a class="button">Cancel</a>
<script src=""></script>
<script src="main.js"></script>
Vue.component('modal', {
template: `
<div class="modal is-active">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">
<slot name="header"></slot>
<button class="delete"></button>
<section class="modal-card-body">
<footer class="modal-card-foot">
<slot name="footer">
<a class="button is-primary">Okay</a>
new Vue({
el: '#root',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment